Differences From Artifact [415ab0ae8e]:
- File tests/OFArrayTests.m — part of check-in [2cb79baae4] at 2010-09-06 13:47:45 on branch trunk — Make OFList conform to OFCollection and OFFastEnumeration protocol. (user: js, size: 6614) [annotate] [blame] [check-ins using]
To Artifact [895b4e152f]:
- File
tests/OFArrayTests.m
— part of check-in
[de45535c23]
at
2010-09-19 02:34:10
on branch trunk
— Only handle the first matching object in OFMutalbeArray operations.
This only makes sense as we use "Object" in the method names, implying
it's only affecting one object. (user: js, size: 6622) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
83 84 85 86 87 88 89 | [[m[0] objectAtIndex: 1] isEqual: c_ary[0]] && [[m[0] objectAtIndex: 2] isEqual: c_ary[2]]) TEST(@"-[replaceObject:identicalTo:]", R([m[0] replaceObjectIdenticalTo: c_ary[0] withObject: c_ary[1]]) && [[m[0] objectAtIndex: 0] isEqual: c_ary[1]] && | | | | | | | | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | [[m[0] objectAtIndex: 1] isEqual: c_ary[0]] && [[m[0] objectAtIndex: 2] isEqual: c_ary[2]]) TEST(@"-[replaceObject:identicalTo:]", R([m[0] replaceObjectIdenticalTo: c_ary[0] withObject: c_ary[1]]) && [[m[0] objectAtIndex: 0] isEqual: c_ary[1]] && [[m[0] objectAtIndex: 1] isEqual: c_ary[0]] && [[m[0] objectAtIndex: 2] isEqual: c_ary[2]]) TEST(@"-[replaceObjectAtIndex:withObject:]", R([m[0] replaceObjectAtIndex: 0 withObject: c_ary[0]]) && [[m[0] objectAtIndex: 0] isEqual: c_ary[0]] && [[m[0] objectAtIndex: 1] isEqual: c_ary[0]] && [[m[0] objectAtIndex: 2] isEqual: c_ary[2]]) TEST(@"-[removeObject:]", R([m[0] removeObject: c_ary[0]]) && [m[0] count] == 2) TEST(@"-[removeObjectIdenticalTo:]", R([m[0] removeObjectIdenticalTo: c_ary[2]]) && [m[0] count] == 1) [m[0] addObject: c_ary[0]]; [m[0] addObject: c_ary[1]]; TEST(@"-[removeNObjects:]", R([m[0] removeNObjects: 2]) && [m[0] count] == 1 && [[m[0] objectAtIndex: 0] isEqual: c_ary[0]]) m[1] = [[a[0] mutableCopy] autorelease]; TEST(@"-[removeObjectAtIndex:]", R([m[1] removeObjectAtIndex: 1]) && [m[1] count] == 2 && [[m[1] objectAtIndex: 1] isEqual: c_ary[2]]) m[1] = [[a[0] mutableCopy] autorelease]; TEST(@"-[removeNObjects:atIndex:]", R([m[1] removeNObjects: 2 atIndex: 0]) && [m[1] count] == 1 && [[m[1] objectAtIndex: 0] isEqual: c_ary[2]]) |
︙ | ︙ |