This commit is contained in:
Aparajita Fishman
2012-07-09 15:47:26 -07:00
parent 2712a4d45c
commit 37a89a7b0a
2 changed files with 13 additions and 3 deletions
+5 -3
View File
@@ -518,9 +518,8 @@
for (; index !== stop; index += increment)
{
var range = _ranges[index];
var rangeIndex,
var range = _ranges[index],
rangeIndex,
rangeStop,
rangeIncrement;
@@ -630,6 +629,7 @@
}
}
}
return CPNotFound;
}
@@ -657,6 +657,7 @@
}
var indexesPassingTest = [CPMutableIndexSet indexSet];
for (; index !== stop; index += increment)
{
var range = _ranges[index],
@@ -689,6 +690,7 @@
}
}
}
return indexesPassingTest;
}
+8
View File
@@ -550,6 +550,7 @@ function descriptionWithoutEntity(aString)
{
return anIndex % 2 === 0;
}];
[self assertTrue:index === CPNotFound message:"must be equal to CPNotFound, was " + index];
[set0 addIndexesInRange:CPMakeRange(1, 10)];
@@ -557,12 +558,14 @@ function descriptionWithoutEntity(aString)
{
return anIndex % 2 === 0;
}];
[self assertTrue:index === 2 message:"index must be equal to 2"];
index = [set0 indexPassingTest:function(anIndex)
{
return anIndex === 1000;
}];
[self assertTrue:index === CPNotFound message:"must be equal to CPNotFound, was " + index];
}
@@ -587,6 +590,7 @@ function descriptionWithoutEntity(aString)
{
return anIndex % 2 === 0;
}];
[self assertTrue:[indexes isEqualToIndexSet:set1] message:"must be equal to " + [set1 description] + ", was " + [indexes description]];
}
@@ -598,6 +602,7 @@ function descriptionWithoutEntity(aString)
{
return anIndex % 2 === 0;
}];
[self assertTrue:index === 10 message:"index must be equal to 10"];
}
@@ -612,6 +617,7 @@ function descriptionWithoutEntity(aString)
visitedIndexes.push(anIndex);
return anIndex % 2 === 0;
}];
[set1 addIndex:2];
[set1 addIndex:4];
@@ -628,6 +634,7 @@ function descriptionWithoutEntity(aString)
{
return anIndex % 2 === 0;
}];
[self assertTrue:index === 6 message:"index must be equal to 6"];
}
@@ -643,6 +650,7 @@ function descriptionWithoutEntity(aString)
visitedIndexes.push(anIndex);
return anIndex % 2 === 0;
}];
[set1 addIndex:4];
[self assertTrue:[indexes isEqualToIndexSet:set1] message:"must be equal to " + [set1 description] + ", was " + [indexes description]];