Skip to content

Commit 2f2c3f5

Browse files
committed
Fix Ipv6Addr: Display tests
1 parent 3a9a8d4 commit 2f2c3f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/core/tests/net/ip_addr.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ fn ipv6_addr_to_string() {
139139

140140
// ipv4-compatible address
141141
let a1 = Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0xc000, 0x280);
142-
assert_eq!(a1.to_string(), "::192.0.2.128");
142+
assert_eq!(a1.to_string(), "::c000:280");
143143

144144
// v6 address with no zero segments
145145
assert_eq!(Ipv6Addr::new(8, 9, 10, 11, 12, 13, 14, 15).to_string(), "8:9:a:b:c:d:e:f");
@@ -316,7 +316,7 @@ fn ip_properties() {
316316

317317
check!("::", unspec);
318318
check!("::1", loopback);
319-
check!("::0.0.0.2", global);
319+
check!("::2", global);
320320
check!("1::", global);
321321
check!("fc00::");
322322
check!("fdff:ffff::");
@@ -607,7 +607,7 @@ fn ipv6_properties() {
607607

608608
check!("::1", &[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], loopback);
609609

610-
check!("::0.0.0.2", &[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2], global | unicast_global);
610+
check!("::2", &[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2], global | unicast_global);
611611

612612
check!("1::", &[0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], global | unicast_global);
613613

0 commit comments

Comments
 (0)