diff --git a/test/built-ins/Array/prototype/concat/15.4.4.4-5-b-iii-3-b-1.js b/test/built-ins/Array/prototype/concat/15.4.4.4-5-b-iii-3-b-1.js index b256b0c1a6..68f689d306 100644 --- a/test/built-ins/Array/prototype/concat/15.4.4.4-5-b-iii-3-b-1.js +++ b/test/built-ins/Array/prototype/concat/15.4.4.4-5-b-iii-3-b-1.js @@ -6,6 +6,7 @@ esid: sec-array.prototype.concat description: > Array.prototype.concat will concat an Array when index property (read-only) exists in Array.prototype (Step 5.b.iii.3.b) +includes: [propertyHelper.js] ---*/ Object.defineProperty(Array.prototype, "0", { @@ -15,28 +16,11 @@ Object.defineProperty(Array.prototype, "0", { }); var oldArr = [101]; - var newArr = Array.prototype.concat.call(oldArr); -var verifyValue = false; -verifyValue = newArr[0] === 101; - -var verifyEnumerable = false; -for (var p in newArr) { - if (p === "0" && newArr.hasOwnProperty("0")) { - verifyEnumerable = true; - } -} - -var verifyWritable = false; -newArr[0] = 12; -verifyWritable = newArr[0] === 12; - -var verifyConfigurable = false; -delete newArr[0]; -verifyConfigurable = newArr.hasOwnProperty("0"); - -assert(verifyValue, 'verifyValue !== true'); -assert.sameValue(verifyConfigurable, false, 'verifyConfigurable'); -assert(verifyEnumerable, 'verifyEnumerable !== true'); -assert(verifyWritable, 'verifyWritable !== true'); +verifyProperty(newArr, "0", { + value: 101, + writable: true, + enumerable: true, + configurable: true, +}); diff --git a/test/built-ins/Array/prototype/concat/15.4.4.4-5-c-i-1.js b/test/built-ins/Array/prototype/concat/15.4.4.4-5-c-i-1.js index f7b3a92419..274d5b83b7 100644 --- a/test/built-ins/Array/prototype/concat/15.4.4.4-5-c-i-1.js +++ b/test/built-ins/Array/prototype/concat/15.4.4.4-5-c-i-1.js @@ -6,6 +6,7 @@ esid: sec-array.prototype.concat description: > Array.prototype.concat will concat an Array when index property (read-only) exists in Array.prototype (Step 5.c.i) +includes: [propertyHelper.js] ---*/ Object.defineProperty(Array.prototype, "0", { @@ -16,31 +17,9 @@ Object.defineProperty(Array.prototype, "0", { var newArr = Array.prototype.concat.call(101); -var hasProperty = newArr.hasOwnProperty("0"); - -var instanceOfVerify = typeof newArr[0] === "object"; - -var verifyValue = false; -verifyValue = newArr[0] == 101; - -var verifyEnumerable = false; -for (var p in newArr) { - if (p === "0" && newArr.hasOwnProperty("0")) { - verifyEnumerable = true; - } -} - -var verifyWritable = false; -newArr[0] = 12; -verifyWritable = newArr[0] === 12; - -var verifyConfigurable = false; -delete newArr[0]; -verifyConfigurable = newArr.hasOwnProperty("0"); - -assert(hasProperty, 'hasProperty !== true'); -assert(instanceOfVerify, 'instanceOfVerify !== true'); -assert(verifyValue, 'verifyValue !== true'); -assert.sameValue(verifyConfigurable, false, 'verifyConfigurable'); -assert(verifyEnumerable, 'verifyEnumerable !== true'); -assert(verifyWritable, 'verifyWritable !== true'); +assert(newArr[0] instanceof Number); +verifyProperty(newArr, "0", { + writable: true, + enumerable: true, + configurable: true, +});