mirror of
https://github.com/achanda/ipnetwork.git
synced 2025-06-16 16:58:50 +00:00
Add two tests for send and sync
To prevent future regressions as the library evolves
This commit is contained in:
12
src/ipv4.rs
12
src/ipv4.rs
@ -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>();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user