mirror of
https://github.com/achanda/ipnetwork.git
synced 2025-06-15 16:43:00 +00:00
Merge pull request #60 from achanda/send_sync
Add two tests for send and sync
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>();
|
||||
}
|
||||
}
|
||||
|
12
src/ipv6.rs
12
src/ipv6.rs
@ -389,4 +389,16 @@ mod test {
|
||||
let expected = Ipv6Network::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), 128).unwrap();
|
||||
assert_eq!(net, expected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_send() {
|
||||
fn assert_send<T: Send>() {}
|
||||
assert_send::<Ipv6Network>();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_sync() {
|
||||
fn assert_sync<T: Sync>() {}
|
||||
assert_sync::<Ipv6Network>();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user