mirror of
https://github.com/achanda/ipnetwork.git
synced 2025-06-19 18:07:45 +00:00
Add from_cidr test
This commit is contained in:
@ -297,6 +297,12 @@ mod test {
|
||||
assert!(cidr.is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_v4_non_zero_host_bits() {
|
||||
let cidr = Ipv4Network::from_cidr("10.1.1.1/24");
|
||||
assert!(cidr.is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_v4_fail_prefix() {
|
||||
let cidr = Ipv4Network::from_cidr("0/39");
|
||||
|
Reference in New Issue
Block a user