Differences From Artifact [0e44f6026c]:
- File
tests/OFThreadTests.m
— part of check-in
[ea96fd1e24]
at
2010-04-10 21:29:39
on branch trunk
— Greatly improve OFThread.
This fixes a lot of issues that happened in the real world. (user: js, size: 1215) [annotate] [blame] [check-ins using]
To Artifact [1c2bd09aff]:
- File
tests/OFThreadTests.m
— part of check-in
[cc17787021]
at
2010-04-10 21:43:47
on branch trunk
— Minor fix for -[join] in OFThread.
We also want to be able to join a thread that is still running, this
change allows that. (user: js, size: 1217) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
39 40 41 42 43 44 45 | OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; TestThread *t; OFTLSKey *key; TEST(@"+[threadWithObject:]", (t = [TestThread threadWithObject: @"foo"])) | | | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; TestThread *t; OFTLSKey *key; TEST(@"+[threadWithObject:]", (t = [TestThread threadWithObject: @"foo"])) TEST(@"-[start]", [t start]) TEST(@"-[join]", [[t join] isEqual: @"success"]) TEST(@"OFTLSKey's +[tlsKey]", (key = [OFTLSKey tlsKey])) TEST(@"+[setObject:forTLSKey:]", [OFThread setObject: @"foo" forTLSKey: key]) |
︙ | ︙ |