From 74727cd4ed766696c35994ed21d78f9516847a92 Mon Sep 17 00:00:00 2001 From: Wenlu Wang Date: Tue, 20 Jul 2021 16:56:08 +0800 Subject: [PATCH] Fix CR issues --- .../findLast/array-altered-during-loop.js | 2 +- .../Array/prototype/findLast/length.js | 8 +++++--- .../built-ins/Array/prototype/findLast/name.js | 10 ++++++---- .../findLast/predicate-call-parameters.js | 2 +- .../findLast/predicate-call-this-non-strict.js | 2 +- .../findLast/predicate-call-this-strict.js | 2 +- .../Array/prototype/findLast/prop-desc.js | 8 +++++--- ...urn-found-value-predicate-result-is-true.js | 18 +++++++++--------- ...defined-if-predicate-returns-false-value.js | 12 ++++++------ .../Array/prototype/findLastIndex/length.js | 8 +++++--- .../Array/prototype/findLastIndex/name.js | 8 +++++--- .../findLastIndex/predicate-call-parameters.js | 2 +- .../predicate-call-this-non-strict.js | 2 +- .../predicate-call-this-strict.js | 2 +- .../Array/prototype/findLastIndex/prop-desc.js | 8 +++++--- .../return-index-predicate-result-is-true.js | 18 +++++++++--------- ...ive-one-if-predicate-returns-false-value.js | 12 ++++++------ ...urn-found-value-predicate-result-is-true.js | 6 +++--- .../TypedArray/prototype/findLast/length.js | 8 +++++--- .../TypedArray/prototype/findLast/name.js | 8 +++++--- .../TypedArray/prototype/findLast/prop-desc.js | 8 +++++--- ...urn-found-value-predicate-result-is-true.js | 6 +++--- .../return-index-predicate-result-is-true.js | 6 +++--- .../prototype/findLastIndex/length.js | 8 +++++--- .../TypedArray/prototype/findLastIndex/name.js | 8 +++++--- .../prototype/findLastIndex/prop-desc.js | 8 +++++--- .../return-index-predicate-result-is-true.js | 6 +++--- 27 files changed, 110 insertions(+), 86 deletions(-) diff --git a/test/built-ins/Array/prototype/findLast/array-altered-during-loop.js b/test/built-ins/Array/prototype/findLast/array-altered-during-loop.js index 112068946d..674d7771fe 100644 --- a/test/built-ins/Array/prototype/findLast/array-altered-during-loop.js +++ b/test/built-ins/Array/prototype/findLast/array-altered-during-loop.js @@ -4,7 +4,7 @@ esid: sec-array.prototype.findlast description: > The range of elements processed is set before the first call to `predicate`. - info: | +info: | Array.prototype.findLast ( predicate[ , thisArg ] ) ... diff --git a/test/built-ins/Array/prototype/findLast/length.js b/test/built-ins/Array/prototype/findLast/length.js index ae59b3b43b..c2c4924a70 100644 --- a/test/built-ins/Array/prototype/findLast/length.js +++ b/test/built-ins/Array/prototype/findLast/length.js @@ -14,6 +14,8 @@ assert.sameValue( 'The value of `Array.prototype.findLast.length` is `1`' ); -verifyNotEnumerable(Array.prototype.findLast, 'length'); -verifyNotWritable(Array.prototype.findLast, 'length'); -verifyConfigurable(Array.prototype.findLast, 'length'); +verifyProperty(Array.prototype.findLast, "length", { + enumerable: false, + writable: false, + configurable: true +}); diff --git a/test/built-ins/Array/prototype/findLast/name.js b/test/built-ins/Array/prototype/findLast/name.js index 93ccefde28..b901fd5483 100644 --- a/test/built-ins/Array/prototype/findLast/name.js +++ b/test/built-ins/Array/prototype/findLast/name.js @@ -4,7 +4,7 @@ esid: sec-array.prototype.findlast description: > Array.prototype.findLast.name value and descriptor. - info: | +info: | Array.prototype.findLast ( predicate [ , thisArg ] ) 17 ECMAScript Standard Built-in Objects @@ -18,6 +18,8 @@ assert.sameValue( 'The value of `Array.prototype.findLast.name` is `"findLast"`' ); -verifyNotEnumerable(Array.prototype.findLast, 'name'); -verifyNotWritable(Array.prototype.findLast, 'name'); -verifyConfigurable(Array.prototype.findLast, 'name'); +verifyProperty(Array.prototype.findLast, "name", { + enumerable: false, + writable: false, + configurable: true +}); diff --git a/test/built-ins/Array/prototype/findLast/predicate-call-parameters.js b/test/built-ins/Array/prototype/findLast/predicate-call-parameters.js index 1d063d3be7..4ec9b87b6d 100644 --- a/test/built-ins/Array/prototype/findLast/predicate-call-parameters.js +++ b/test/built-ins/Array/prototype/findLast/predicate-call-parameters.js @@ -21,7 +21,7 @@ var arr = ['Mike', 'Rick', 'Leo']; var results = []; -arr.findLast(function(kValue, k, O) { +arr.findLast(function() { results.push(arguments); }); diff --git a/test/built-ins/Array/prototype/findLast/predicate-call-this-non-strict.js b/test/built-ins/Array/prototype/findLast/predicate-call-this-non-strict.js index 3ba7717535..029a863ee4 100644 --- a/test/built-ins/Array/prototype/findLast/predicate-call-this-non-strict.js +++ b/test/built-ins/Array/prototype/findLast/predicate-call-this-non-strict.js @@ -19,7 +19,7 @@ features: [array-find-from-last] var result; -[1].findLast(function(kValue, k, O) { +[1].findLast(function() { result = this; }); diff --git a/test/built-ins/Array/prototype/findLast/predicate-call-this-strict.js b/test/built-ins/Array/prototype/findLast/predicate-call-this-strict.js index 3ea488980a..c736223da4 100644 --- a/test/built-ins/Array/prototype/findLast/predicate-call-this-strict.js +++ b/test/built-ins/Array/prototype/findLast/predicate-call-this-strict.js @@ -19,7 +19,7 @@ features: [array-find-from-last] var result; -[1].findLast(function(kValue, k, O) { +[1].findLast(function() { result = this; }); diff --git a/test/built-ins/Array/prototype/findLast/prop-desc.js b/test/built-ins/Array/prototype/findLast/prop-desc.js index a3d1512fbf..6d3184637d 100644 --- a/test/built-ins/Array/prototype/findLast/prop-desc.js +++ b/test/built-ins/Array/prototype/findLast/prop-desc.js @@ -15,6 +15,8 @@ assert.sameValue( '`typeof Array.prototype.findLast` is `function`' ); -verifyNotEnumerable(Array.prototype, 'findLast'); -verifyWritable(Array.prototype, 'findLast'); -verifyConfigurable(Array.prototype, 'findLast'); +verifyProperty(Array.prototype, "findLast", { + enumerable: false, + writable: true, + configurable: true +}); diff --git a/test/built-ins/Array/prototype/findLast/return-found-value-predicate-result-is-true.js b/test/built-ins/Array/prototype/findLast/return-found-value-predicate-result-is-true.js index 176c62384c..fb95633604 100644 --- a/test/built-ins/Array/prototype/findLast/return-found-value-predicate-result-is-true.js +++ b/test/built-ins/Array/prototype/findLast/return-found-value-predicate-result-is-true.js @@ -19,7 +19,7 @@ features: [Symbol, array-find-from-last] var arr = ['Shoes', 'Car', 'Bike']; var called = 0; -var result = arr.findLast(function(val) { +var result = arr.findLast(function() { called++; return true; }); @@ -30,33 +30,33 @@ assert.sameValue(called, 1, 'predicate was called once'); called = 0; result = arr.findLast(function(val) { called++; - return val === 'Bike'; + return val === 'Shoes'; }); -assert.sameValue(called, 1, 'predicate was called three times'); -assert.sameValue(result, 'Bike'); +assert.sameValue(called, 3, 'predicate was called three times'); +assert.sameValue(result, 'Shoes'); -result = arr.findLast(function(val) { +result = arr.findLast(function() { return 'string'; }); assert.sameValue(result, 'Bike', 'coerced string'); -result = arr.findLast(function(val) { +result = arr.findLast(function() { return {}; }); assert.sameValue(result, 'Bike', 'coerced object'); -result = arr.findLast(function(val) { +result = arr.findLast(function() { return Symbol(''); }); assert.sameValue(result, 'Bike', 'coerced Symbol'); -result = arr.findLast(function(val) { +result = arr.findLast(function() { return 1; }); assert.sameValue(result, 'Bike', 'coerced number'); -result = arr.findLast(function(val) { +result = arr.findLast(function() { return -1; }); assert.sameValue(result, 'Bike', 'coerced negative number'); diff --git a/test/built-ins/Array/prototype/findLast/return-undefined-if-predicate-returns-false-value.js b/test/built-ins/Array/prototype/findLast/return-undefined-if-predicate-returns-false-value.js index 857985ff88..77ee8feea9 100644 --- a/test/built-ins/Array/prototype/findLast/return-undefined-if-predicate-returns-false-value.js +++ b/test/built-ins/Array/prototype/findLast/return-undefined-if-predicate-returns-false-value.js @@ -19,7 +19,7 @@ features: [Symbol, array-find-from-last] var arr = ['Shoes', 'Car', 'Bike']; var called = 0; -var result = arr.findLast(function(val) { +var result = arr.findLast(function() { called++; return false; }); @@ -27,27 +27,27 @@ var result = arr.findLast(function(val) { assert.sameValue(called, 3, 'predicate was called three times'); assert.sameValue(result, undefined); -result = arr.findLast(function(val) { +result = arr.findLast(function() { return ''; }); assert.sameValue(result, undefined, 'coerced string'); -result = arr.findLast(function(val) { +result = arr.findLast(function() { return undefined; }); assert.sameValue(result, undefined, 'coerced undefined'); -result = arr.findLast(function(val) { +result = arr.findLast(function() { return null; }); assert.sameValue(result, undefined, 'coerced null'); -result = arr.findLast(function(val) { +result = arr.findLast(function() { return 0; }); assert.sameValue(result, undefined, 'coerced 0'); -result = arr.findLast(function(val) { +result = arr.findLast(function() { return NaN; }); assert.sameValue(result, undefined, 'coerced NaN'); diff --git a/test/built-ins/Array/prototype/findLastIndex/length.js b/test/built-ins/Array/prototype/findLastIndex/length.js index 76f1f5a435..24b6e019a5 100644 --- a/test/built-ins/Array/prototype/findLastIndex/length.js +++ b/test/built-ins/Array/prototype/findLastIndex/length.js @@ -14,6 +14,8 @@ assert.sameValue( 'The value of `Array.prototype.findLastIndex.length` is `1`' ); -verifyNotEnumerable(Array.prototype.findLastIndex, 'length'); -verifyNotWritable(Array.prototype.findLastIndex, 'length'); -verifyConfigurable(Array.prototype.findLastIndex, 'length'); +verifyProperty(Array.prototype.findLastIndex, "length", { + enumerable: false, + writable: false, + configurable: true +}); diff --git a/test/built-ins/Array/prototype/findLastIndex/name.js b/test/built-ins/Array/prototype/findLastIndex/name.js index 78f4ec9621..9ea6733a0e 100644 --- a/test/built-ins/Array/prototype/findLastIndex/name.js +++ b/test/built-ins/Array/prototype/findLastIndex/name.js @@ -18,6 +18,8 @@ assert.sameValue( 'The value of `Array.prototype.findLastIndex.name` is `"findLastIndex"`' ); -verifyNotEnumerable(Array.prototype.findLastIndex, 'name'); -verifyNotWritable(Array.prototype.findLastIndex, 'name'); -verifyConfigurable(Array.prototype.findLastIndex, 'name'); +verifyProperty(Array.prototype.findLastIndex, "name", { + enumerable: false, + writable: false, + configurable: true +}); diff --git a/test/built-ins/Array/prototype/findLastIndex/predicate-call-parameters.js b/test/built-ins/Array/prototype/findLastIndex/predicate-call-parameters.js index b3ce6289a2..db5327a4ab 100644 --- a/test/built-ins/Array/prototype/findLastIndex/predicate-call-parameters.js +++ b/test/built-ins/Array/prototype/findLastIndex/predicate-call-parameters.js @@ -20,7 +20,7 @@ var arr = ['Mike', 'Rick', 'Leo']; var results = []; -arr.findLastIndex(function(kValue, k, O) { +arr.findLastIndex(function() { results.push(arguments); }); diff --git a/test/built-ins/Array/prototype/findLastIndex/predicate-call-this-non-strict.js b/test/built-ins/Array/prototype/findLastIndex/predicate-call-this-non-strict.js index 9a22c37e94..b38b0ff31d 100644 --- a/test/built-ins/Array/prototype/findLastIndex/predicate-call-this-non-strict.js +++ b/test/built-ins/Array/prototype/findLastIndex/predicate-call-this-non-strict.js @@ -19,7 +19,7 @@ features: [array-find-from-last] var result; -[1].findLastIndex(function(kValue, k, O) { +[1].findLastIndex(function() { result = this; }); diff --git a/test/built-ins/Array/prototype/findLastIndex/predicate-call-this-strict.js b/test/built-ins/Array/prototype/findLastIndex/predicate-call-this-strict.js index 7d12a6d184..372979f936 100644 --- a/test/built-ins/Array/prototype/findLastIndex/predicate-call-this-strict.js +++ b/test/built-ins/Array/prototype/findLastIndex/predicate-call-this-strict.js @@ -19,7 +19,7 @@ features: [array-find-from-last] var result; -[1].findLastIndex(function(kValue, k, O) { +[1].findLastIndex(function() { result = this; }); diff --git a/test/built-ins/Array/prototype/findLastIndex/prop-desc.js b/test/built-ins/Array/prototype/findLastIndex/prop-desc.js index ae197a97cc..06218fabb6 100644 --- a/test/built-ins/Array/prototype/findLastIndex/prop-desc.js +++ b/test/built-ins/Array/prototype/findLastIndex/prop-desc.js @@ -15,6 +15,8 @@ assert.sameValue( '`typeof Array.prototype.findLastIndex` is `function`' ); -verifyNotEnumerable(Array.prototype, 'findLastIndex'); -verifyWritable(Array.prototype, 'findLastIndex'); -verifyConfigurable(Array.prototype, 'findLastIndex'); +verifyProperty(Array.prototype, "findLastIndex", { + enumerable: false, + writable: true, + configurable: true +}); diff --git a/test/built-ins/Array/prototype/findLastIndex/return-index-predicate-result-is-true.js b/test/built-ins/Array/prototype/findLastIndex/return-index-predicate-result-is-true.js index d08562c6a2..d9c88c8100 100644 --- a/test/built-ins/Array/prototype/findLastIndex/return-index-predicate-result-is-true.js +++ b/test/built-ins/Array/prototype/findLastIndex/return-index-predicate-result-is-true.js @@ -19,7 +19,7 @@ features: [Symbol, array-find-from-last] var arr = ['Shoes', 'Car', 'Bike']; var called = 0; -var result = arr.findLastIndex(function(val) { +var result = arr.findLastIndex(function() { called++; return true; }); @@ -30,33 +30,33 @@ assert.sameValue(called, 1, 'predicate was called once'); called = 0; result = arr.findLastIndex(function(val) { called++; - return val === 'Bike'; + return val === 'Shoes'; }); -assert.sameValue(called, 1, 'predicate was called three times'); -assert.sameValue(result, 2); +assert.sameValue(called, 3, 'predicate was called three times'); +assert.sameValue(result, 0); -result = arr.findLastIndex(function(val) { +result = arr.findLastIndex(function() { return 'string'; }); assert.sameValue(result, 2, 'coerced string'); -result = arr.findLastIndex(function(val) { +result = arr.findLastIndex(function() { return {}; }); assert.sameValue(result, 2, 'coerced object'); -result = arr.findLastIndex(function(val) { +result = arr.findLastIndex(function() { return Symbol(''); }); assert.sameValue(result, 2, 'coerced Symbol'); -result = arr.findLastIndex(function(val) { +result = arr.findLastIndex(function() { return 1; }); assert.sameValue(result, 2, 'coerced number'); -result = arr.findLastIndex(function(val) { +result = arr.findLastIndex(function() { return -1; }); assert.sameValue(result, 2, 'coerced negative number'); diff --git a/test/built-ins/Array/prototype/findLastIndex/return-negative-one-if-predicate-returns-false-value.js b/test/built-ins/Array/prototype/findLastIndex/return-negative-one-if-predicate-returns-false-value.js index f1f7c0ceef..39f21d70f1 100644 --- a/test/built-ins/Array/prototype/findLastIndex/return-negative-one-if-predicate-returns-false-value.js +++ b/test/built-ins/Array/prototype/findLastIndex/return-negative-one-if-predicate-returns-false-value.js @@ -19,7 +19,7 @@ features: [Symbol, array-find-from-last] var arr = ['Shoes', 'Car', 'Bike']; var called = 0; -var result = arr.findLastIndex(function(val) { +var result = arr.findLastIndex(function() { called++; return false; }); @@ -27,27 +27,27 @@ var result = arr.findLastIndex(function(val) { assert.sameValue(called, 3, 'predicate was called three times'); assert.sameValue(result, -1); -result = arr.findLastIndex(function(val) { +result = arr.findLastIndex(function() { return ''; }); assert.sameValue(result, -1, 'coerced string'); -result = arr.findLastIndex(function(val) { +result = arr.findLastIndex(function() { return undefined; }); assert.sameValue(result, -1, 'coerced undefined'); -result = arr.findLastIndex(function(val) { +result = arr.findLastIndex(function() { return null; }); assert.sameValue(result, -1, 'coerced null'); -result = arr.findLastIndex(function(val) { +result = arr.findLastIndex(function() { return 0; }); assert.sameValue(result, -1, 'coerced 0'); -result = arr.findLastIndex(function(val) { +result = arr.findLastIndex(function() { return NaN; }); assert.sameValue(result, -1, 'coerced NaN'); 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 22e4dc8821..ef27e1d588 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 @@ -31,10 +31,10 @@ testWithBigIntTypedArrayConstructors(function(TA) { called = 0; result = sample.findLast(function(val) { called++; - return val === 62n; + return val === 39n; }); - assert.sameValue(called, 1, "predicate was called once"); - assert.sameValue(result, 62n, "returned true on sample[2]"); + assert.sameValue(called, 3, "predicate was called three times"); + assert.sameValue(result, 39n, "returned true on sample[0]"); result = sample.findLast(function() { return "string"; }); assert.sameValue(result, 62n, "ToBoolean(string)"); diff --git a/test/built-ins/TypedArray/prototype/findLast/length.js b/test/built-ins/TypedArray/prototype/findLast/length.js index 78b3757713..13c881f17a 100644 --- a/test/built-ins/TypedArray/prototype/findLast/length.js +++ b/test/built-ins/TypedArray/prototype/findLast/length.js @@ -25,6 +25,8 @@ features: [TypedArray, array-find-from-last] assert.sameValue(TypedArray.prototype.findLast.length, 1); -verifyNotEnumerable(TypedArray.prototype.findLast, "length"); -verifyNotWritable(TypedArray.prototype.findLast, "length"); -verifyConfigurable(TypedArray.prototype.findLast, "length"); +verifyProperty(TypedArray.prototype.findLast, "length", { + enumerable: false, + writable: false, + configurable: true +}); diff --git a/test/built-ins/TypedArray/prototype/findLast/name.js b/test/built-ins/TypedArray/prototype/findLast/name.js index ae5cda0e5e..346cee8d11 100644 --- a/test/built-ins/TypedArray/prototype/findLast/name.js +++ b/test/built-ins/TypedArray/prototype/findLast/name.js @@ -22,6 +22,8 @@ features: [TypedArray, array-find-from-last] assert.sameValue(TypedArray.prototype.findLast.name, "findLast"); -verifyNotEnumerable(TypedArray.prototype.findLast, "name"); -verifyNotWritable(TypedArray.prototype.findLast, "name"); -verifyConfigurable(TypedArray.prototype.findLast, "name"); +verifyProperty(TypedArray.prototype.findLast, "name", { + enumerable: false, + writable: false, + configurable: true +}); diff --git a/test/built-ins/TypedArray/prototype/findLast/prop-desc.js b/test/built-ins/TypedArray/prototype/findLast/prop-desc.js index 66437d3d12..49c3e67cf6 100644 --- a/test/built-ins/TypedArray/prototype/findLast/prop-desc.js +++ b/test/built-ins/TypedArray/prototype/findLast/prop-desc.js @@ -14,6 +14,8 @@ features: [TypedArray, array-find-from-last] var TypedArrayPrototype = TypedArray.prototype; -verifyNotEnumerable(TypedArrayPrototype, 'findLast'); -verifyWritable(TypedArrayPrototype, 'findLast'); -verifyConfigurable(TypedArrayPrototype, 'findLast'); +verifyProperty(TypedArray.prototype, "findLast", { + enumerable: false, + writable: true, + configurable: true +}); 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 ce779d5cf2..70bf03037b 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 @@ -31,10 +31,10 @@ testWithTypedArrayConstructors(function(TA) { called = 0; result = sample.findLast(function(val) { called++; - return val === 62; + return val === 39; }); - assert.sameValue(called, 1, "predicate was called once"); - assert.sameValue(result, 62, "returned true on sample[2]"); + assert.sameValue(called, 3, "predicate was called three times"); + assert.sameValue(result, 39, "returned true on sample[0]"); result = sample.findLast(function() { return "string"; }); assert.sameValue(result, 62, "ToBoolean(string)"); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-index-predicate-result-is-true.js b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-index-predicate-result-is-true.js index 1bff91690f..87d14f59b8 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-index-predicate-result-is-true.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-index-predicate-result-is-true.js @@ -33,11 +33,11 @@ testWithBigIntTypedArrayConstructors(function(TA) { called = 0; result = sample.findLastIndex(function(val) { called++; - return val === 9n; + return val === 39n; }); - assert.sameValue(called, 1, "predicate was called once"); - assert.sameValue(result, 2, "returned true on sample[2]"); + assert.sameValue(called, 3, "predicate was called three times"); + assert.sameValue(result, 0, "returned true on sample[0]"); result = sample.findLastIndex(function() { return "string"; }); assert.sameValue(result, 2, "ToBoolean(string)"); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/length.js b/test/built-ins/TypedArray/prototype/findLastIndex/length.js index 4ebe82250a..42f8b24189 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/length.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/length.js @@ -25,6 +25,8 @@ features: [TypedArray, array-find-from-last] assert.sameValue(TypedArray.prototype.findLastIndex.length, 1); -verifyNotEnumerable(TypedArray.prototype.findLastIndex, "length"); -verifyNotWritable(TypedArray.prototype.findLastIndex, "length"); -verifyConfigurable(TypedArray.prototype.findLastIndex, "length"); +verifyProperty(TypedArray.prototype.findLastIndex, "length", { + enumerable: false, + writable: false, + configurable: true +}); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/name.js b/test/built-ins/TypedArray/prototype/findLastIndex/name.js index 6b7b4f37d5..e6ae3cb4e6 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/name.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/name.js @@ -22,6 +22,8 @@ features: [TypedArray, array-find-from-last] assert.sameValue(TypedArray.prototype.findLastIndex.name, "findLastIndex"); -verifyNotEnumerable(TypedArray.prototype.findLastIndex, "name"); -verifyNotWritable(TypedArray.prototype.findLastIndex, "name"); -verifyConfigurable(TypedArray.prototype.findLastIndex, "name"); +verifyProperty(TypedArray.prototype.findLastIndex, "name", { + enumerable: false, + writable: false, + configurable: true +}); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/prop-desc.js b/test/built-ins/TypedArray/prototype/findLastIndex/prop-desc.js index d11392e32d..ca15d089d0 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/prop-desc.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/prop-desc.js @@ -14,6 +14,8 @@ features: [TypedArray, array-find-from-last] var TypedArrayPrototype = TypedArray.prototype; -verifyNotEnumerable(TypedArrayPrototype, 'findLastIndex'); -verifyWritable(TypedArrayPrototype, 'findLastIndex'); -verifyConfigurable(TypedArrayPrototype, 'findLastIndex'); +verifyProperty(TypedArray.prototype, "findLastIndex", { + enumerable: false, + writable: true, + configurable: true +}); diff --git a/test/built-ins/TypedArray/prototype/findLastIndex/return-index-predicate-result-is-true.js b/test/built-ins/TypedArray/prototype/findLastIndex/return-index-predicate-result-is-true.js index 7a154a8e1e..9bbe02627e 100644 --- a/test/built-ins/TypedArray/prototype/findLastIndex/return-index-predicate-result-is-true.js +++ b/test/built-ins/TypedArray/prototype/findLastIndex/return-index-predicate-result-is-true.js @@ -33,11 +33,11 @@ testWithTypedArrayConstructors(function(TA) { called = 0; result = sample.findLastIndex(function(val) { called++; - return val === 9; + return val === 39; }); - assert.sameValue(called, 1, "predicate was called once"); - assert.sameValue(result, 2, "returned true on sample[2]"); + assert.sameValue(called, 3, "predicate was called three times"); + assert.sameValue(result, 0, "returned true on sample[0]"); result = sample.findLastIndex(function() { return "string"; }); assert.sameValue(result, 2, "ToBoolean(string)");