Differences From Artifact [3d043537f3]:
- File tests/OFSocketTests.m — part of check-in [1a86b8175b] at 2022-02-12 07:46:07 on branch trunk — Update copyright (user: js, size: 7949) [annotate] [blame] [check-ins using] [more...]
To Artifact [0766971ff5]:
- File
tests/OFSocketTests.m
— part of check-in
[a54730b88f]
at
2022-10-22 18:41:45
on branch trunk
— OFSocket: Don't combine port for IP and IPX
While it works for those two protocols, it's a bad precedent as other
protocols have different types for ports. (user: js, size: 7953) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
79 80 81 82 83 84 85 | EXPECT_EXCEPTION(@"Refusing invalid IPv4 #5", OFInvalidFormatException, OFSocketAddressParseIP(@"127.0.a.1", 1234)) EXPECT_EXCEPTION(@"Refusing invalid IPv4 #6", OFInvalidFormatException, OFSocketAddressParseIP(@"127.0..1", 1234)) | | | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | EXPECT_EXCEPTION(@"Refusing invalid IPv4 #5", OFInvalidFormatException, OFSocketAddressParseIP(@"127.0.a.1", 1234)) EXPECT_EXCEPTION(@"Refusing invalid IPv4 #6", OFInvalidFormatException, OFSocketAddressParseIP(@"127.0..1", 1234)) TEST(@"Port of an IPv4 address", OFSocketAddressIPPort(&addr) == 1234) TEST(@"Converting an IPv4 to a string", [OFSocketAddressString(&addr) isEqual: @"127.0.0.1"]) TEST(@"Parsing an IPv6 #1", R(addr = OFSocketAddressParseIP( @"1122:3344:5566:7788:99aa:bbCc:ddee:ff00", 1234)) && |
︙ | ︙ | |||
141 142 143 144 145 146 147 | EXPECT_EXCEPTION(@"Refusing invalid IPv6 #9", OFInvalidFormatException, OFSocketAddressParseIP(@"1:2:3:4:5:6:7::", 1234)) EXPECT_EXCEPTION(@"Refusing invalid IPv6 #10", OFInvalidFormatException, OFSocketAddressParseIP(@"1:2", 1234)) | | | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | EXPECT_EXCEPTION(@"Refusing invalid IPv6 #9", OFInvalidFormatException, OFSocketAddressParseIP(@"1:2:3:4:5:6:7::", 1234)) EXPECT_EXCEPTION(@"Refusing invalid IPv6 #10", OFInvalidFormatException, OFSocketAddressParseIP(@"1:2", 1234)) TEST(@"Port of an IPv6 address", OFSocketAddressIPPort(&addr) == 1234) SET_V6(addr, 0, 0, 0, 0, 0, 0, 0, 0) TEST(@"Converting an IPv6 to a string #1", [OFSocketAddressString(&addr) isEqual: @"::"]) SET_V6(addr, 0, 0, 0, 0, 0, 0, 0, 1) TEST(@"Converting an IPv6 to a string #2", |
︙ | ︙ |