mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-18 12:39:22 +00:00
Bug fixes for failing test cases
This commit is contained in:
1 parent
b52217e8a0
commit
fd59efe41f
2 files changed
+3
-4
No files matched your search
@@ -347,7 +347,7 @@
|
||||
while ((index = [self indexOfObject:theObject inRange:theRange]) !== CPNotFound)
|
||||
{
|
||||
[self removeObjectAtIndex:index];
|
||||
theRange = CPIntersectionRange(CPMakeRange(index, length - index), theRange);
|
||||
theRange = CPIntersectionRange(CPMakeRange(index, self.length - index), theRange);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -427,7 +427,7 @@
|
||||
[CPException raise:CPInvalidArgumentException reason:"called valueForKey: on an array with a complex key (" + aKey + "). use valueForKeyPath:"];
|
||||
|
||||
if (aKey === "@count")
|
||||
return length;
|
||||
return self.length;
|
||||
|
||||
return [self valueForUndefinedKey:aKey];
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ var ELEMENTS = 100,
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
var descriptors = [
|
||||
descriptors = [
|
||||
[CPSortDescriptor sortDescriptorWithKey:"a" ascending:NO],
|
||||
[CPSortDescriptor sortDescriptorWithKey:"b" ascending:YES]
|
||||
];
|
||||
@@ -26,7 +26,6 @@ var ELEMENTS = 100,
|
||||
CPLog.warn("\nNUMERIC ALMOST SORTED");
|
||||
var a = [self makeUnsorted],
|
||||
sorted = [self sort:a usingSortSelector:@selector(sortedArrayUsingDescriptors:) withObject:descriptors];
|
||||
print("a: " + (a == sorted ? "Yes" : "No"));
|
||||
[self checkAlmostSorted:sorted];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user