units: test for C-SEND-SYNC

Done as part of the Rust API guidelines checklist.

Add a unit test for `Send` and one for `Sync`.
This commit is contained in:
Tobin C. Harding 2024-12-09 10:49:59 +11:00
parent dde5f47ce4
commit ffdd63fa8e
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 14 additions and 0 deletions

View File

@ -235,3 +235,17 @@ fn api_all_non_error_types_have_non_empty_debug() {
let debug = format!("{:?}", t.b.k); let debug = format!("{:?}", t.b.k);
assert!(!debug.is_empty()); assert!(!debug.is_empty());
} }
#[test]
fn test_send() {
fn assert_send<T: Send>() {}
assert_send::<Types>();
assert_send::<Errors>();
}
#[test]
fn test_sync() {
fn assert_sync<T: Sync>() {}
assert_sync::<Types>();
assert_sync::<Errors>();
}