Fix a pair of mistyped test cases in std::net::ip

This commit is contained in:
Scallop Ye 2021-12-26 16:41:32 +08:00 committed by GitHub
parent 51e8031e14
commit e3ad30962e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -77,10 +77,10 @@ fn test_from_str_ipv4_in_ipv6() {
let none: Option<Ipv4Addr> = "::127.0.0.1:".parse().ok();
assert_eq!(None, none);
// not enough groups
let none: Option<Ipv6Addr> = "1.2.3.4.5:127.0.0.1".parse().ok();
let none: Option<Ipv6Addr> = "1:2:3:4:5:127.0.0.1".parse().ok();
assert_eq!(None, none);
// too many groups
let none: Option<Ipv6Addr> = "1.2.3.4.5:6:7:127.0.0.1".parse().ok();
let none: Option<Ipv6Addr> = "1:2:3:4:5:6:7:127.0.0.1".parse().ok();
assert_eq!(None, none);
}