Bug fixes for failing test cases

This commit is contained in:
Martin Carlberg committed 2012-12-17 11:15:50 +01:00
1 parent b52217e8a0
commit fd59efe41f
2 files changed
+3 -4

No files matched your search

+2 -2
View File
@@ -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];
}
+1 -2
View File
@@ -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];
}