Differences From Artifact [62dfb8dace]:
- File
tests/OFSetTests.m
— part of check-in
[2a27cf3000]
at
2016-01-03 00:41:26
on branch trunk
— Update copyright
While at it, also update the mail address. (user: js, size: 3465) [annotate] [blame] [check-ins using]
To Artifact [a90285c3e6]:
- File
tests/OFSetTests.m
— part of check-in
[ef8d57bd4e]
at
2016-06-05 20:37:10
on branch trunk
— Implement Key Value Coding for OFSet
If the key starts with an @, the @ is stripped and the super method is
called. Otherwise, this returns the value for all objects / sets the
value for all objects. (user: js, size: 3835) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * file. */ #include "config.h" #import "OFSet.h" #import "OFArray.h" #import "OFAutoreleasePool.h" #import "OFEnumerationMutationException.h" #import "TestsAppDelegate.h" static OFString *module = @"OFSet"; | > | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * file. */ #include "config.h" #import "OFSet.h" #import "OFArray.h" #import "OFNumber.h" #import "OFAutoreleasePool.h" #import "OFEnumerationMutationException.h" #import "TestsAppDelegate.h" static OFString *module = @"OFSet"; |
︙ | ︙ | |||
126 127 128 129 130 131 132 133 134 135 | [mutableSet removeObject: s]; } @catch (OFEnumerationMutationException *e) { ok = true; } TEST(@"Detection of mutation during Fast Enumeration", ok); [pool drain]; } @end | > > > > > > > > | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | [mutableSet removeObject: s]; } @catch (OFEnumerationMutationException *e) { ok = true; } TEST(@"Detection of mutation during Fast Enumeration", ok); TEST(@"-[valueForKey:]", [(set1 = [[OFSet setWithObjects: @"a", @"ab", @"abc", @"b", nil] valueForKey: @"length"]) isEqual: [OFSet setWithObjects: [OFNumber numberWithSize: 1], [OFNumber numberWithSize: 2], [OFNumber numberWithSize: 3], nil]] && [[set1 valueForKey: @"@count"] isEqual: [OFNumber numberWithSize: 3]]) [pool drain]; } @end |