Differences From Artifact [c54892547e]:
- File
tests/OFDictionaryTests.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: 9922) [annotate] [blame] [check-ins using]
To Artifact [4a69123110]:
- File tests/OFDictionaryTests.m — part of check-in [b045cbb9c7] at 2019-03-25 00:21:30 on branch trunk — tests: Use dot syntax (user: js, size: 9916) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
319 320 321 322 323 324 325 | TEST(@"-[filteredDictionaryUsingBlock:]", [[[mutDict filteredDictionaryUsingBlock: ^ bool (id key, id object) { return [key isEqual: keys[0]]; }] description] isEqual: @"{\n\tkey1 = value_1;\n}"]) #endif | | | 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | TEST(@"-[filteredDictionaryUsingBlock:]", [[[mutDict filteredDictionaryUsingBlock: ^ bool (id key, id object) { return [key isEqual: keys[0]]; }] description] isEqual: @"{\n\tkey1 = value_1;\n}"]) #endif TEST(@"-[count]", mutDict.count == 2) TEST(@"+[dictionaryWithKeysAndObjects:]", (dict = [dictionaryClass dictionaryWithKeysAndObjects: @"foo", @"bar", @"baz", @"qux", nil]) && [[dict objectForKey: @"foo"] isEqual: @"bar"] && [[dict objectForKey: @"baz"] isEqual: @"qux"]) |
︙ | ︙ | |||
347 348 349 350 351 352 353 | TEST(@"-[copy]", (dict = [[dict copy] autorelease]) && [[dict objectForKey: keys[0]] isEqual: values[0]] && [[dict objectForKey: keys[1]] isEqual: values[1]]) TEST(@"-[mutableCopy]", (mutDict = [[dict mutableCopy] autorelease]) && | | | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 | TEST(@"-[copy]", (dict = [[dict copy] autorelease]) && [[dict objectForKey: keys[0]] isEqual: values[0]] && [[dict objectForKey: keys[1]] isEqual: values[1]]) TEST(@"-[mutableCopy]", (mutDict = [[dict mutableCopy] autorelease]) && mutDict.count == dict.count && [[mutDict objectForKey: keys[0]] isEqual: values[0]] && [[mutDict objectForKey: keys[1]] isEqual: values[1]] && R([mutDict setObject: @"value3" forKey: @"key3"]) && [[mutDict objectForKey: @"key3"] isEqual: @"value3"] && [[mutDict objectForKey: keys[0]] isEqual: values[0]] && R([mutDict setObject: @"foo" |
︙ | ︙ |