Add two tests for send and sync

To prevent future regressions as the library evolves
This commit is contained in:
Abhishek Chanda
2017-09-22 17:56:43 +01:00
parent 384f86d590
commit 8ee7f2d1ed
2 changed files with 24 additions and 0 deletions

View File

@ -449,4 +449,16 @@ mod test {
let expected = Ipv4Network::new(Ipv4Addr::new(127, 0, 0, 1), 32).unwrap();
assert_eq!(net, expected);
}
#[test]
fn test_send() {
fn assert_send<T: Send>() {}
assert_send::<Ipv4Network>();
}
#[test]
fn test_sync() {
fn assert_sync<T: Sync>() {}
assert_sync::<Ipv4Network>();
}
}