Differences From Artifact [e01b68cb73]:
- File
tests/OFUDPSocketTests.m
— part of check-in
[dc0c6c34ab]
at
2019-02-17 22:44:23
on branch trunk
— tests: Only import ObjFW.h
This prevents forgetting to add an import to ObjFW.h, as the tests would
then not compile. (user: js, size: 2089) [annotate] [blame] [check-ins using]
To Artifact [a0e1bef0c4]:
- File
tests/OFUDPSocketTests.m
— part of check-in
[09be825f88]
at
2019-09-29 15:58:33
on branch trunk
— Remove OFAutoreleasePool
OFAutoreleasePools have long been discouraged in favor of the runtime's
autorelease pools. (user: js, size: 2087) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
22 23 24 25 26 27 28 | #import "TestsAppDelegate.h" static OFString *module = @"OFUDPSocket"; @implementation TestsAppDelegate (OFUDPSocketTests) - (void)UDPSocketTests { | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #import "TestsAppDelegate.h" static OFString *module = @"OFUDPSocket"; @implementation TestsAppDelegate (OFUDPSocketTests) - (void)UDPSocketTests { void *pool = objc_autoreleasePoolPush(); OFUDPSocket *sock; uint16_t port1, port2; of_socket_address_t addr1, addr2, addr3; char buf[6]; OFString *host; TEST(@"+[socket]", (sock = [OFUDPSocket socket])) |
︙ | ︙ | |||
64 65 66 67 68 69 70 | of_socket_address_equal(&addr1, &addr2) && !of_socket_address_equal(&addr1, &addr3)) TEST(@"of_socket_address_hash()", of_socket_address_hash(&addr1) == of_socket_address_hash(&addr2) && of_socket_address_hash(&addr1) != of_socket_address_hash(&addr3)) | | | 64 65 66 67 68 69 70 71 72 73 | of_socket_address_equal(&addr1, &addr2) && !of_socket_address_equal(&addr1, &addr3)) TEST(@"of_socket_address_hash()", of_socket_address_hash(&addr1) == of_socket_address_hash(&addr2) && of_socket_address_hash(&addr1) != of_socket_address_hash(&addr3)) objc_autoreleasePoolPop(pool); } @end |