Differences From Artifact [78f1739521]:
- File tests/OFSetTests.m — part of check-in [f8b53e2f6b] at 2019-06-20 23:45:11 on branch trunk — OFSet: Add default method for fast enumeration (user: js, size: 6414) [annotate] [blame] [check-ins using]
To Artifact [cf6c84cec3]:
- File
tests/OFSetTests.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: 6412) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
161 162 163 164 165 166 167 | } @end @implementation TestsAppDelegate (OFSetTests) - (void)setTestsWithClass: (Class)setClass mutableClass: (Class)mutableSetClass { | | | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | } @end @implementation TestsAppDelegate (OFSetTests) - (void)setTestsWithClass: (Class)setClass mutableClass: (Class)mutableSetClass { void *pool = objc_autoreleasePoolPush(); OFSet *set1, *set2; OFMutableSet *mutableSet; bool ok; size_t i; TEST(@"+[setWithArray:]", (set1 = [setClass setWithArray: [OFArray arrayWithObjects: @"foo", |
︙ | ︙ | |||
279 280 281 282 283 284 285 | [(set1 = [[setClass setWithObjects: @"a", @"ab", @"abc", @"b", nil] valueForKey: @"length"]) isEqual: [setClass setWithObjects: [OFNumber numberWithSize: 1], [OFNumber numberWithSize: 2], [OFNumber numberWithSize: 3], nil]] && [[set1 valueForKey: @"@count"] isEqual: [OFNumber numberWithSize: 3]]) | | | 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | [(set1 = [[setClass setWithObjects: @"a", @"ab", @"abc", @"b", nil] valueForKey: @"length"]) isEqual: [setClass setWithObjects: [OFNumber numberWithSize: 1], [OFNumber numberWithSize: 2], [OFNumber numberWithSize: 3], nil]] && [[set1 valueForKey: @"@count"] isEqual: [OFNumber numberWithSize: 3]]) objc_autoreleasePoolPop(pool); } - (void)setTests { module = @"OFSet"; [self setTestsWithClass: [SimpleSet class] mutableClass: [SimpleMutableSet class]]; module = @"OFMapTableSet"; [self setTestsWithClass: [OFMapTableSet class] mutableClass: [OFMutableMapTableSet class]]; } @end |