Fix minor typo

This commit is contained in:
Wenlu Wang 2021-07-16 15:22:06 +08:00 committed by rwaldron
parent f354da8ba4
commit 642a180e62
5 changed files with 9 additions and 9 deletions

View File

@ -50,7 +50,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
sample = new TA(arr);
result = sample.findLast(function(val, i) {
if ( i <= 2 ) {
if ( i < 2 ) {
sample[2] = 7n;
}
return val === 7n;

View File

@ -25,7 +25,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
called++;
return true;
});
assert.sameValue(result, 62n, "returned true on sample[0]");
assert.sameValue(result, 62n, "returned true on sample[2]");
assert.sameValue(called, 1, "predicate was called once");
called = 0;
@ -33,8 +33,8 @@ testWithBigIntTypedArrayConstructors(function(TA) {
called++;
return val === 62n;
});
assert.sameValue(called, 1, "predicate was called three times");
assert.sameValue(result, 62n, "returned true on sample[3]");
assert.sameValue(called, 1, "predicate was called once");
assert.sameValue(result, 62n, "returned true on sample[2]");
result = sample.findLast(function() { return "string"; });
assert.sameValue(result, 62n, "ToBoolean(string)");

View File

@ -50,7 +50,7 @@ testWithTypedArrayConstructors(function(TA) {
sample = new TA(arr);
result = sample.findLast(function(val, i) {
if ( i <= 2 ) {
if ( i < 2 ) {
sample[2] = 7;
}
return val === 7;

View File

@ -25,7 +25,7 @@ testWithTypedArrayConstructors(function(TA) {
called++;
return true;
});
assert.sameValue(result, 62, "returned true on sample[0]");
assert.sameValue(result, 62, "returned true on sample[2]");
assert.sameValue(called, 1, "predicate was called once");
called = 0;
@ -33,8 +33,8 @@ testWithTypedArrayConstructors(function(TA) {
called++;
return val === 62;
});
assert.sameValue(called, 1, "predicate was called three times");
assert.sameValue(result, 62, "returned true on sample[3]");
assert.sameValue(called, 1, "predicate was called once");
assert.sameValue(result, 62, "returned true on sample[2]");
result = sample.findLast(function() { return "string"; });
assert.sameValue(result, 62, "ToBoolean(string)");

View File

@ -49,7 +49,7 @@ testWithTypedArrayConstructors(function(TA) {
sample = new TA(arr);
result = sample.findLastIndex(function(val, i) {
if ( i <= 2) {
if ( i < 2) {
sample[2] = 7;
}
return val === 7;