Skip to content

Commit

Permalink
Assert that native Context is Send+Sync.
Browse files Browse the repository at this point in the history
  • Loading branch information
surban authored and grovesNL committed Nov 27, 2023
1 parent edfd08e commit c4a5f71
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3218,3 +3218,20 @@ extern "system" fn raw_debug_message_callback(
(callback)(source, gltype, id, severity, msg);
});
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn test_send() {
fn assert_send<T: Send>() {}
assert_send::<Context>();
}

#[test]
fn test_sync() {
fn assert_sync<T: Sync>() {}
assert_sync::<Context>();
}
}

0 comments on commit c4a5f71

Please sign in to comment.