ref: c4030c7f8d157876db45c7becdf192065640e68d
parent: e74148eb539e0809131fe837c2d123b0c295f9ce
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Jan 2 21:16:48 EST 2016
Fix mismatched array sizes in ipv6 tests.
--- a/lib/std/test/ipparse.myr
+++ b/lib/std/test/ipparse.myr
@@ -12,16 +12,28 @@
/* valid ipv6 addresses */
eq("2a03:2880:2110:df07:face:b00c:0:1", \
- `std.Some `std.Ipv6 [0x2a, 0x03, 0x28, 0x80, 0x21, 0x10,
- 0xdf, 0xfa, 0xce, 0xb0, 0x0c, 0x00, 0x00, 0x01, 0x01])
+ `std.Some `std.Ipv6 [ \
+ 0x2a, 0x03, 0x28, 0x80, \
+ 0x21, 0x10, 0xdf, 0x07, \
+ 0xfa, 0xce, 0xb0, 0x0c, \
+ 0x00, 0x00, 0x00, 0x01])
eq("abcd::dcba", \
- `std.Some `std.Ipv6 [0xab, 0xcd, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])
+ `std.Some `std.Ipv6 [ \
+ 0xab, 0xcd, 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00, \
+ 0x00, 0x00, 0xdc, 0xba])
eq("::abcd:dcba", \
- `std.Some `std.Ipv6 [0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xab, 0xcd, 0xdc, 0xba])
- eq("::", `std.Some `std.Ipv6 [0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])
+ `std.Some `std.Ipv6 [ \
+ 0x00, 0x00, 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00, \
+ 0xab, 0xcd, 0xdc, 0xba])
+ eq("::", `std.Some `std.Ipv6 [ \
+ 0x00, 0x00, 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00])
/* invalid ipv4 addresses */
eq("2a03:2880:2110:df07:face:b00c:0:1:abc", `std.None) /* too long */