mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-14 20:44:29 +00:00
Test indexOfObject:inSortedRange: with out of range insertion point.
This commit is contained in:
1 parent
9954a75cdd
commit
8e0b3a5df3
1 file changed
+8
-2
@@ -163,13 +163,19 @@
|
||||
inSortedRange:nil
|
||||
options:0
|
||||
usingComparator:numComparator];
|
||||
[self assert:CPNotFound equals:index message:"simple index of non existant value"];
|
||||
[self assert:CPNotFound equals:index message:"simple index of non existent value"];
|
||||
|
||||
index = [arraySimple indexOfObject:6
|
||||
inSortedRange:nil
|
||||
options:CPBinarySearchingInsertionIndex
|
||||
usingComparator:numComparator];
|
||||
[self assert:2 equals:index message:"simple insertion index of non existant value"];
|
||||
[self assert:2 equals:index message:"simple insertion index of non existent value"];
|
||||
|
||||
index = [arraySimple indexOfObject:6
|
||||
inSortedRange:CPMakeRange(3, 2) // [ -, -, -, 7, 8]
|
||||
options:CPBinarySearchingInsertionIndex
|
||||
usingComparator:numComparator];
|
||||
[self assert:3 equals:index message:"simple insertion index with range"];
|
||||
|
||||
index = [array indexOfObject:1
|
||||
inSortedRange:nil
|
||||
|
||||
Reference in new issue
Block a user