Differences From Artifact [1bbed581ea]:
- File
tests/OFUDPSocketTests.m
— part of check-in
[8aeee6680a]
at
2018-07-28 20:21:01
on branch trunk
— Add of_socket_address_ip_string()
This replaces of_address_to_string_and_port(). (user: js, size: 2291) [annotate] [blame] [check-ins using]
To Artifact [b4dbd2c54c]:
- File
tests/OFUDPSocketTests.m
— part of check-in
[6e9ee122eb]
at
2018-10-07 02:06:46
on branch trunk
— Remove resolver.m
Instead, OFDNSResolver is used for everything now. (user: js, size: 2159) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
39 40 41 42 43 44 45 | TEST(@"+[socket]", (sock = [OFUDPSocket socket])) TEST(@"-[bindToHost:port:]", (port1 = [sock bindToHost: @"127.0.0.1" port: 0])) | < | < < | < < | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | TEST(@"+[socket]", (sock = [OFUDPSocket socket])) TEST(@"-[bindToHost:port:]", (port1 = [sock bindToHost: @"127.0.0.1" port: 0])) addr1 = of_socket_address_parse_ip(@"127.0.0.1", port1); TEST(@"-[sendBuffer:length:receiver:]", R([sock sendBuffer: "Hello" length: 6 receiver: &addr1])) TEST(@"-[receiveIntoBuffer:length:sender:]", [sock receiveIntoBuffer: buf length: 6 sender: &addr2] == 6 && !memcmp(buf, "Hello", 6) && (host = of_socket_address_ip_string(&addr2, &port2)) && [host isEqual: @"127.0.0.1"] && port2 == port1) addr3 = of_socket_address_parse_ip(@"127.0.0.1", port1 + 1); /* * TODO: Move those tests elsewhere as soon as the DNS resolving part * is no longer in OFUDPSocket. */ TEST(@"of_socket_address_equal()", of_socket_address_equal(&addr1, &addr2) && |
︙ | ︙ |