Merge rust-bitcoin/rust-bitcoin#3706: units: test for C-SEND-SYNC

ffdd63fa8e units: test for C-SEND-SYNC (Tobin C. Harding)

Pull request description:

  Done as part of the Rust API guidelines checklist.

  Add a unit test for `Send` and one for `Sync`.

ACKs for top commit:
  apoelstra:
    ACK ffdd63fa8ec3575bc3087241ebdcbccc71818ab7; successfully ran local tests; ooh, I like how extensible this API test framework is!

Tree-SHA512: 9227ad487f77596964c728deee97c62a04490510a8ab69fd3fc29a3e400b37114e27c777cf868fe58de870a9ff0aca3d234ccf2bb93d69a709e8c9b85d44fc61
This commit is contained in:
merge-script 2024-12-09 19:44:31 +00:00
commit ecab6857bf
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
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);
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>();
}