mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-15 03:03:50 +00:00
Merge commit 'c4370240f8e31c257f038b661a2e171fe346f28b'
This commit is contained in:
commit
b791289dfe
2 files changed
+13
-2
No files matched your search
@@ -218,7 +218,7 @@
|
||||
*/
|
||||
- (void)removeObject:(id)anObject
|
||||
{
|
||||
[self removeObject:anObject inRange:CPMakeRange(0, self.length)];
|
||||
[self removeObject:anObject inRange:CPMakeRange(0, [self count])];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -233,7 +233,7 @@
|
||||
while ((index = [self indexOfObject:anObject inRange:aRange]) != CPNotFound)
|
||||
{
|
||||
[self removeObjectAtIndex:index];
|
||||
aRange = CPIntersectionRange(CPMakeRange(index, self.length - index), aRange);
|
||||
aRange = CPIntersectionRange(CPMakeRange(index, [self count] - index), aRange);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,6 +92,17 @@
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)test_removeObject_
|
||||
{
|
||||
var arrayClass = [[self class] arrayClass],
|
||||
a = [CPDate distantFuture],
|
||||
b = [a copy],
|
||||
c = [CPDate distantPast],
|
||||
array = [arrayClass arrayWithObjects:a, b, a, c, b];
|
||||
|
||||
[array removeObject:a];
|
||||
[self assert:array equals:[arrayClass arrayWithObjects:c]];
|
||||
}
|
||||
- (void)test_removeObjectsAtIndexes_
|
||||
{
|
||||
var arrayClass = [[self class] arrayClass],
|
||||
|
||||
Reference in new issue
Block a user