Differences From Artifact [fb8f211ca9]:
- File
tests/OFThreadTests.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: 1313) [annotate] [blame] [check-ins using]
To Artifact [c49f1dd816]:
- File
tests/OFThreadTests.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: 1311) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
33 34 35 36 37 38 39 | return @"success"; } @end @implementation TestsAppDelegate (OFThreadTests) - (void)threadTests { | | | | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | return @"success"; } @end @implementation TestsAppDelegate (OFThreadTests) - (void)threadTests { void *pool = objc_autoreleasePoolPush(); TestThread *t; OFMutableDictionary *d; TEST(@"+[thread]", (t = [TestThread thread])) TEST(@"-[start]", R([t start])) TEST(@"-[join]", [[t join] isEqual: @"success"]) TEST(@"-[threadDictionary]", (d = [OFThread threadDictionary]) && [d objectForKey: @"foo"] == nil) objc_autoreleasePoolPop(pool); } @end |