Differences From Artifact [1c451b0231]:
- File tests/OFTCPSocketTests.m — part of check-in [b045cbb9c7] at 2019-03-25 00:21:30 on branch trunk — tests: Use dot syntax (user: js, size: 1651) [annotate] [blame] [check-ins using]
To Artifact [3676496bb6]:
- File
tests/OFTCPSocketTests.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: 1649) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
22 23 24 25 26 27 28 | #import "TestsAppDelegate.h" static OFString *module = @"OFTCPSocket"; @implementation TestsAppDelegate (OFTCPSocketTests) - (void)TCPSocketTests { | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #import "TestsAppDelegate.h" static OFString *module = @"OFTCPSocket"; @implementation TestsAppDelegate (OFTCPSocketTests) - (void)TCPSocketTests { void *pool = objc_autoreleasePoolPush(); OFTCPSocket *server, *client = nil, *accepted; uint16_t port; char buf[6]; TEST(@"+[socket]", (server = [OFTCPSocket socket]) && (client = [OFTCPSocket socket])) |
︙ | ︙ | |||
52 53 54 55 56 57 58 | TEST(@"-[writeString:]", [client writeString: @"Hello!"]) TEST(@"-[readIntoBuffer:length:]", [accepted readIntoBuffer: buf length: 6] && !memcmp(buf, "Hello!", 6)) | | | 52 53 54 55 56 57 58 59 60 61 | TEST(@"-[writeString:]", [client writeString: @"Hello!"]) TEST(@"-[readIntoBuffer:length:]", [accepted readIntoBuffer: buf length: 6] && !memcmp(buf, "Hello!", 6)) objc_autoreleasePoolPop(pool); } @end |