diff --git a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-changes-value.js b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-changes-value.js index bcb0c42798..7f9c6612c5 100644 --- a/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-changes-value.js +++ b/test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-changes-value.js @@ -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; diff --git a/test/built-ins/TypedArray/prototype/findLast/BigInt/return-found-value-predicate-result-is-true.js b/test/built-ins/TypedArray/prototype/findLast/BigInt/return-found-value-predicate-result-is-true.js index faad6a4696..f7319806b7 100644 --- a/test/built-ins/TypedArray/prototype/findLast/BigInt/return-found-value-predicate-result-is-true.js +++ b/test/built-ins/TypedArray/prototype/findLast/BigInt/return-found-value-predicate-result-is-true.js @@ -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)"); diff --git a/test/built-ins/TypedArray/prototype/findLast/predicate-call-changes-value.js b/test/built-ins/TypedArray/prototype/findLast/predicate-call-changes-value.js index 9a7aef4b7f..e1cebb207b 100644 --- a/test/built-ins/TypedArray/prototype/findLast/predicate-call-changes-value.js +++ b/test/built-ins/TypedArray/prototype/findLast/predicate-call-changes-value.js @@ -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; diff --git a/test/built-ins/TypedArray/prototype/findLast/return-found-value-predicate-result-is-true.js b/test/built-ins/TypedArray/prototype/findLast/return-found-value-predicate-result-is-true.js index e01e854fee..759943c779 100644 --- a/test/built-ins/TypedArray/prototype/findLast/return-found-value-predicate-result-is-true.js +++ b/test/built-ins/TypedArray/prototype/findLast/return-found-value-predicate-result-is-true.js @@ -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)"); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-changes-value.js b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-changes-value.js index b30716b92a..b6dd047ad2 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-changes-value.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-changes-value.js @@ -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;