diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Object')
779 files changed, 3961 insertions, 4268 deletions
diff --git a/js/src/tests/test262/built-ins/Object/assign/assign-descriptor.js b/js/src/tests/test262/built-ins/Object/assign/assign-descriptor.js index 5ee1c8216e..29f23b7b63 100644 --- a/js/src/tests/test262/built-ins/Object/assign/assign-descriptor.js +++ b/js/src/tests/test262/built-ins/Object/assign/assign-descriptor.js @@ -7,8 +7,10 @@ includes: [propertyHelper.js] es6id: 19.1.2.1 ---*/ -verifyWritable(Object, "assign"); -verifyNotEnumerable(Object, "assign"); -verifyConfigurable(Object, "assign"); +verifyProperty(Object, "assign", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/assign/assign-length.js b/js/src/tests/test262/built-ins/Object/assign/assign-length.js index bcfe2e2eda..600508b7b0 100644 --- a/js/src/tests/test262/built-ins/Object/assign/assign-length.js +++ b/js/src/tests/test262/built-ins/Object/assign/assign-length.js @@ -15,12 +15,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue( - Object.assign.length, 2, "The length property of the assign method should be 2." -); - -verifyNotEnumerable(Object.assign, 'length'); -verifyNotWritable(Object.assign, 'length'); -verifyConfigurable(Object.assign, 'length'); +verifyProperty(Object.assign, "length", { + value: 2, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/assign/name.js b/js/src/tests/test262/built-ins/Object/assign/name.js index bab32445c2..c67ef4b8e0 100644 --- a/js/src/tests/test262/built-ins/Object/assign/name.js +++ b/js/src/tests/test262/built-ins/Object/assign/name.js @@ -19,14 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue( - Object.assign.name, - 'assign', - 'The value of `Object.assign.name` is `"assign"`' -); - -verifyNotEnumerable(Object.assign, 'name'); -verifyNotWritable(Object.assign, 'name'); -verifyConfigurable(Object.assign, 'name'); +verifyProperty(Object.assign, "name", { + value: "assign", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/assign/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/assign/not-a-constructor.js index 3c66a4c64a..b94cd4b8e6 100644 --- a/js/src/tests/test262/built-ins/Object/assign/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/assign/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Object.assign), false, 'isConstructor(Object.assi assert.throws(TypeError, () => { new Object.assign({}); -}, '`new Object.assign({})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-100.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-100.js index ed3a1d5d13..a0c715b273 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-100.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-100.js @@ -15,7 +15,8 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop"), "expected newObj to have 'prop'"); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-101.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-101.js index f325ce5059..4f2cd35373 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-101.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-101.js @@ -15,7 +15,8 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-103.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-103.js index 4da2d10566..811c119bc2 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-103.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-103.js @@ -26,7 +26,8 @@ var newObj = Object.create({}, { prop: descObj }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-104.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-104.js index b76ea8de8b..b5e01360a6 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-104.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-104.js @@ -29,7 +29,8 @@ var newObj = Object.create({}, { prop: descObj }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-107.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-107.js index 867a3f4e8c..8cdc1a6017 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-107.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-107.js @@ -28,7 +28,8 @@ var newObj = Object.create({}, { prop: descObj }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-108.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-108.js index 14d9da3a70..bab1b7a16b 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-108.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-108.js @@ -31,7 +31,8 @@ var newObj = Object.create({}, { prop: descObj }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-109.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-109.js index 8a38c3975e..20bf5a59cb 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-109.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-109.js @@ -19,7 +19,8 @@ var newObj = Object.create({}, { prop: descObj }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-110.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-110.js index 9ac2bcea84..60d6fdc53a 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-110.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-110.js @@ -29,7 +29,8 @@ var newObj = Object.create({}, { prop: descObj }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-111.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-111.js index e979fe76d7..0b46894531 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-111.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-111.js @@ -24,7 +24,8 @@ var newObj = Object.create({}, { prop: descObj }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-125.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-125.js index 17eef5947c..8687b5e1d0 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-125.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-125.js @@ -15,8 +15,8 @@ var newObj = Object.create({}, { } }); - -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-126.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-126.js index 489b57cf3e..42d3dddcee 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-126.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-126.js @@ -15,7 +15,8 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-128.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-128.js index 77cb2171ae..4e1669e5d4 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-128.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-128.js @@ -15,7 +15,8 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-129.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-129.js index 1cf82338ee..e16ee5219a 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-129.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-129.js @@ -15,7 +15,8 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-130.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-130.js index 30855dd7c6..2e8b5ebe33 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-130.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-130.js @@ -15,8 +15,8 @@ var newObj = Object.create({}, { } }); - -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-131.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-131.js index a27ff05e7e..6e86080eb6 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-131.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-131.js @@ -15,7 +15,8 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-132.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-132.js index 0f59a2aa10..00f9ef0d31 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-132.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-132.js @@ -15,7 +15,8 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-135.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-135.js index d6aef6ae19..a74ecda218 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-135.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-135.js @@ -15,7 +15,8 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-179.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-179.js index ceb1884864..e5df5e0c3d 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-179.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-179.js @@ -15,7 +15,9 @@ var newObj = Object.create({}, { } }); -assert.sameValue(newObj.prop, 100); -verifyNotWritable(newObj, "prop"); +verifyProperty(newObj, "prop", { + value: 100, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-188.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-188.js index 91d8c80a52..3d7c3d84f5 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-188.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-188.js @@ -22,7 +22,9 @@ var newObj = Object.create({}, { prop: descObj }); -assert.sameValue(newObj.prop, 100); -verifyNotWritable(newObj, "prop"); +verifyProperty(newObj, "prop", { + value: 100, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-189.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-189.js index 13f8a80bd2..a50b416503 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-189.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-189.js @@ -31,8 +31,9 @@ var newObj = Object.create({}, { prop: descObj }); -assert(newObj.hasOwnProperty("prop")) -assert.sameValue(typeof(newObj.prop), "undefined"); -verifyNotWritable(newObj, "prop"); +verifyProperty(newObj, "prop", { + value: undefined, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-190.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-190.js index 039dd3b032..28f3dfd9ff 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-190.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-190.js @@ -27,7 +27,9 @@ var newObj = Object.create({}, { prop: descObj }); -assert.sameValue(newObj.prop, 100); -verifyNotWritable(newObj, "prop"); +verifyProperty(newObj, "prop", { + value: 100, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-204.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-204.js index 17993ba415..c965df9186 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-204.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-204.js @@ -15,8 +15,9 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -assert.sameValue(typeof newObj.prop, "undefined"); -verifyNotWritable(newObj, "prop"); +verifyProperty(newObj, "prop", { + value: undefined, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-205.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-205.js index 7e414aa5dd..960a0263ef 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-205.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-205.js @@ -15,8 +15,9 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -assert.sameValue(typeof newObj.prop, "undefined"); -verifyNotWritable(newObj, "prop"); +verifyProperty(newObj, "prop", { + value: undefined, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-207.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-207.js index 40513388d8..c1b7043ec6 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-207.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-207.js @@ -15,8 +15,9 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -assert.sameValue(typeof newObj.prop, "undefined"); -verifyNotWritable(newObj, "prop"); +verifyProperty(newObj, "prop", { + value: undefined, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-208.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-208.js index 864af6abf5..0e67c30cb8 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-208.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-208.js @@ -15,8 +15,9 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -assert.sameValue(typeof newObj.prop, "undefined"); -verifyNotWritable(newObj, "prop"); +verifyProperty(newObj, "prop", { + value: undefined, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-209.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-209.js index 057ad51efe..135391d72e 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-209.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-209.js @@ -15,8 +15,9 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -assert.sameValue(typeof newObj.prop, "undefined"); -verifyNotWritable(newObj, "prop"); +verifyProperty(newObj, "prop", { + value: undefined, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-210.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-210.js index d6ff45fb8c..6ec80189af 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-210.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-210.js @@ -15,8 +15,9 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")) -assert.sameValue(typeof newObj.prop, "undefined"); -verifyNotWritable(newObj, "prop"); +verifyProperty(newObj, "prop", { + value: undefined, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-211.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-211.js index 84a03d23c3..bf6d20941e 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-211.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-211.js @@ -15,8 +15,9 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -assert.sameValue(typeof newObj.prop, "undefined") -verifyNotWritable(newObj, "prop"); +verifyProperty(newObj, "prop", { + value: undefined, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-214.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-214.js index 209db64dda..e80e422d9d 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-214.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-214.js @@ -17,8 +17,9 @@ var newObj = Object.create({}, { prop: descObj }); -assert(newObj.hasOwnProperty("prop")) -assert.sameValue(typeof newObj.prop, "undefined"); -verifyNotWritable(newObj, "prop"); +verifyProperty(newObj, "prop", { + value: undefined, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-307.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-307.js index 02d1a9e465..0f969ae43b 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-307.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-307.js @@ -17,7 +17,8 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -verifyNotWritable(newObj, "prop"); +verifyProperty(newObj, "prop", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-309.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-309.js index 41f48bb638..2977950c78 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-309.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-309.js @@ -18,7 +18,8 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-311.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-311.js index 169e7a69b9..a8c67f0b15 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-311.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-311.js @@ -7,6 +7,7 @@ description: > Object.create - [[Set]] is set as undefined if it is absent in accessor descriptor of one property in 'Properties' (8.12.9 step 4.b) +includes: [propertyHelper.js] ---*/ var newObj = Object.create({}, { @@ -27,21 +28,12 @@ if (newObj.prop === "verifyCreate") { verifyGet = true; } -var verifyEnumerable = false; -for (var p in newObj) { - if (p === "prop") { - verifyEnumerable = true; - } -} - -var verifyConfigurable = false; -var hasProperty = newObj.hasOwnProperty("prop"); -delete newObj.prop; -verifyConfigurable = !newObj.hasOwnProperty("prop") && hasProperty; - assert(verifySet, 'verifySet !== true'); assert(verifyGet, 'verifyGet !== true'); -assert(verifyEnumerable, 'verifyEnumerable !== true'); -assert(verifyConfigurable, 'verifyConfigurable !== true'); + +verifyProperty(newObj, "prop", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-313.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-313.js index b3b0299d4e..988d79ae82 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-313.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-313.js @@ -18,7 +18,8 @@ var newObj = Object.create({}, { } }); -assert(newObj.hasOwnProperty("prop")); -verifyNotConfigurable(newObj, "prop"); +verifyProperty(newObj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-315.js b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-315.js index 2c381680ce..5474af39cb 100644 --- a/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-315.js +++ b/js/src/tests/test262/built-ins/Object/create/15.2.3.5-4-315.js @@ -34,20 +34,20 @@ newObj = Object.create({}, { } }); -verifyEqualTo(newObj, "foo1", 200); - -verifyWritable(newObj, "foo1"); - -verifyEnumerable(newObj, "foo1"); - -verifyConfigurable(newObj, "foo1"); +verifyProperty(newObj, "foo1", { + value: 200, + writable: true, + enumerable: true, + configurable: true, +}); verifyEqualTo(newObj, "foo2", getFunc()); verifyWritable(newObj, "foo2", "setVerifyHelpProp"); -verifyEnumerable(newObj, "foo2"); - -verifyConfigurable(newObj, "foo2"); +verifyProperty(newObj, "foo2", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/name.js b/js/src/tests/test262/built-ins/Object/create/name.js index 63cfe5f126..3555fac0ab 100644 --- a/js/src/tests/test262/built-ins/Object/create/name.js +++ b/js/src/tests/test262/built-ins/Object/create/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.create.name, "create"); - -verifyNotEnumerable(Object.create, "name"); -verifyNotWritable(Object.create, "name"); -verifyConfigurable(Object.create, "name"); +verifyProperty(Object.create, "name", { + value: "create", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/create/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/create/not-a-constructor.js index 00efa6dc33..86e898b19a 100644 --- a/js/src/tests/test262/built-ins/Object/create/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/create/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Object.create), false, 'isConstructor(Object.crea assert.throws(TypeError, () => { new Object.create(null); -}, '`new Object.create(null)` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-138.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-138.js index 1ca3793d7b..65fada01d7 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-138.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-138.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-139.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-139.js index f73e256111..a0522ec731 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-139.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-139.js @@ -17,6 +17,8 @@ Object.defineProperties(obj, { } }); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-140.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-140.js index 5e059a4a76..bc0aaee31f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-140.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-140.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-141.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-141.js index da71de2a5e..9be76bcecf 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-141.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-141.js @@ -24,7 +24,8 @@ Object.defineProperties(obj, { property: descObj }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-142.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-142.js index 226a32e614..7f68e3a3d3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-142.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-142.js @@ -27,7 +27,8 @@ Object.defineProperties(obj, { property: descObj }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-143.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-143.js index 0336ed473b..e22d52d4f8 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-143.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-143.js @@ -35,7 +35,8 @@ Object.defineProperties(obj, { property: descObj }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-144.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-144.js index 1fc7a18431..db1f2541fd 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-144.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-144.js @@ -23,7 +23,8 @@ Object.defineProperties(obj, { property: descObj }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-146.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-146.js index 4cd423d4aa..c1bfdc8238 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-146.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-146.js @@ -31,7 +31,8 @@ Object.defineProperties(obj, { property: descObj }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-147.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-147.js index 8d1b4a1b50..a6a0dc8021 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-147.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-147.js @@ -35,7 +35,8 @@ Object.defineProperties(obj, { property: descObj }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-148.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-148.js index 63cb98e814..393b64d1bf 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-148.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-148.js @@ -21,7 +21,8 @@ Object.defineProperties(obj, { property: descObj }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-149.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-149.js index 1c2556cbc8..069f8267ce 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-149.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-149.js @@ -33,7 +33,8 @@ Object.defineProperties(obj, { property: descObj }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-150.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-150.js index 4c4b1717dc..dd4c0627c2 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-150.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-150.js @@ -27,7 +27,8 @@ Object.defineProperties(obj, { property: descObj }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-151.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-151.js index 65c386d29e..52b27802bb 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-151.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-151.js @@ -22,7 +22,8 @@ Object.defineProperties(obj, { property: func }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-152.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-152.js index 8c48fb76e7..9f41fd0f16 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-152.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-152.js @@ -20,7 +20,8 @@ Object.defineProperties(obj, { property: arr }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-153.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-153.js index bb53c4479c..8350b76d13 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-153.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-153.js @@ -20,7 +20,8 @@ Object.defineProperties(obj, { property: str }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-154.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-154.js index 9169fecaa5..f525efe3bc 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-154.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-154.js @@ -20,7 +20,8 @@ Object.defineProperties(obj, { property: descObj }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-155.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-155.js index 9e00beb444..4c9fc79514 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-155.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-155.js @@ -20,7 +20,8 @@ Object.defineProperties(obj, { property: descObj }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-156.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-156.js index 2ecb58c0ff..32f35ad65a 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-156.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-156.js @@ -19,7 +19,8 @@ Object.defineProperties(obj, { property: Math }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-157.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-157.js index f59bf901cf..2f8b893640 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-157.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-157.js @@ -20,7 +20,8 @@ Object.defineProperties(obj, { property: descObj }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-158.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-158.js index 3dfaede9c5..d496fb8c3f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-158.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-158.js @@ -20,7 +20,8 @@ Object.defineProperties(obj, { property: descObj }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-159.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-159.js index 8aa6779cc4..0caea972f3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-159.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-159.js @@ -18,7 +18,8 @@ Object.defineProperties(obj, { property: JSON }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-160.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-160.js index 5b32ddb731..4c25c2e3f8 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-160.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-160.js @@ -20,7 +20,8 @@ Object.defineProperties(obj, { property: descObj }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-161.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-161.js index 1b952cf469..b716822825 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-161.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-161.js @@ -19,8 +19,9 @@ var func = function(a, b) { property: arguments }); - assert(obj.hasOwnProperty("property")); - verifyNotWritable(obj, "property"); + verifyProperty(obj, "property", { + writable: false, + }); }; func(); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-163.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-163.js index 16940fe042..0592cacc01 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-163.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-163.js @@ -19,7 +19,8 @@ Object.defineProperties(obj, { property: this }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-164.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-164.js index 46ee75a0b4..e02de2a1c8 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-164.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-164.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-165.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-165.js index 4c84d6a35f..88f2995544 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-165.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-165.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-167.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-167.js index 93001e24f6..edcadba7ad 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-167.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-167.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-168.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-168.js index 59e2d01fe4..e7e798f730 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-168.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-168.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-169.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-169.js index 1482e22d29..b0f1b30c4a 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-169.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-169.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-170.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-170.js index 44fcd2d56f..8027fce780 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-170.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-170.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-171.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-171.js index 5a4d2a2dda..b77bbe2b3d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-171.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-171.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-174.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-174.js index d018248861..dbadab16b2 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-174.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-174.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-60.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-60.js index a213b737e8..3764293f9b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-60.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-60.js @@ -16,7 +16,8 @@ Object.defineProperties(obj, { prop: {} }); -assert(obj.hasOwnProperty("prop")); -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-63.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-63.js index 3564a3c259..fcf969e5eb 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-63.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-63.js @@ -28,7 +28,8 @@ Object.defineProperties(obj, { prop: descObj }); -assert(obj.hasOwnProperty("prop")); -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-64.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-64.js index 895a3897ef..f3dd14d728 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-64.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-64.js @@ -31,7 +31,8 @@ Object.defineProperties(obj, { prop: descObj }); -assert(obj.hasOwnProperty("prop")); -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-67.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-67.js index b9abacb080..513a5bdd5f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-67.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-67.js @@ -30,7 +30,8 @@ Object.defineProperties(obj, { prop: descObj }); -assert(obj.hasOwnProperty("prop")); -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-68.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-68.js index bc74560e09..53d33da07e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-68.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-68.js @@ -33,8 +33,8 @@ Object.defineProperties(obj, { prop: descObj }); -assert(obj.hasOwnProperty("prop")); -verifyNotConfigurable(obj, "prop"); -assert(obj.hasOwnProperty("prop")); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-69.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-69.js index baa2e16a9c..d2f6ee592e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-69.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-69.js @@ -20,7 +20,8 @@ Object.defineProperties(obj, { prop: descObj }); -assert(obj.hasOwnProperty("prop")); -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-70.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-70.js index ef2e2468f2..5a354476bb 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-70.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-70.js @@ -31,7 +31,8 @@ Object.defineProperties(obj, { prop: descObj }); -assert(obj.hasOwnProperty("prop")); -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-71.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-71.js index b0915952d0..a610b091ca 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-71.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-71.js @@ -25,7 +25,8 @@ Object.defineProperties(obj, { prop: descObj }); -assert(obj.hasOwnProperty("prop")); -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-85.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-85.js index 4417c630c6..94c392693d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-85.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-85.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-86.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-86.js index 2745ab8dc5..a856931390 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-86.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-86.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-88.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-88.js index 461bc8e7eb..c7f4adced9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-88.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-88.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-89.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-89.js index 79c808f491..be36e00228 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-89.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-89.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-90.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-90.js index 198d61ea03..ccb64939b7 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-90.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-90.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-91.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-91.js index 701fe1df53..40b32a4e38 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-91.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-91.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-92.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-92.js index b7997b1714..cda32f5710 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-92.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-92.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-95.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-95.js index db02d8a4c9..277eea621a 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-95.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-5-b-95.js @@ -17,7 +17,8 @@ Object.defineProperties(obj, { } }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-100.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-100.js index 47bc46e287..dfe8e37455 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-100.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-100.js @@ -25,12 +25,12 @@ Object.defineProperties(obj, { configurable: false } }); -verifyEqualTo(obj, "foo", 200); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 200, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-101.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-101.js index 462fb436d4..a0292d8c7f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-101.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-101.js @@ -41,8 +41,9 @@ verifyEqualTo(obj, "foo", get_func2()); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-102.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-102.js index a52e3b7580..6691b4e82e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-102.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-102.js @@ -34,8 +34,9 @@ Object.defineProperties(obj, { }); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-103.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-103.js index 69239b2647..6963afe790 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-103.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-103.js @@ -36,8 +36,9 @@ verifyEqualTo(obj, "foo", get_func()); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-104.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-104.js index 9723898ac6..75e893ec15 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-104.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-104.js @@ -41,8 +41,9 @@ verifyEqualTo(obj, "foo", get_func()); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-105.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-105.js index e8557c7375..5e04bee2d5 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-105.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-105.js @@ -6,6 +6,7 @@ es5id: 15.2.3.7-6-a-105 description: > Object.defineProperties - 'P' is accessor property, P.[[Set]] is present and properties.[[Set]] is undefined (8.12.9 step 12) +includes: [propertyHelper.js] ---*/ var obj = {}; @@ -31,7 +32,6 @@ Object.defineProperties(obj, { } }); -var hasProperty = obj.hasOwnProperty("property"); var verifyGet = false; verifyGet = (obj.property === 10); @@ -39,21 +39,13 @@ var verifySet = false; var desc = Object.getOwnPropertyDescriptor(obj, "property"); verifySet = (typeof desc.set === 'undefined'); -var verifyEnumerable = false; -for (var p in obj) { - if (p === "property") { - verifyEnumerable = true; - } -} - -var verifyConfigurable = false; -delete obj.property; -verifyConfigurable = obj.hasOwnProperty("property"); +verifyProperty(obj, "property", { + enumerable: true, + configurable: true, +}); -assert(hasProperty, 'hasProperty !== true'); assert(verifyGet, 'verifyGet !== true'); assert(verifySet, 'verifySet !== true'); -assert(verifyEnumerable, 'verifyEnumerable !== true'); -assert.sameValue(verifyConfigurable, false, 'verifyConfigurable'); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-106.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-106.js index 67cf09ee28..fff80e4e60 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-106.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-106.js @@ -36,8 +36,9 @@ verifyEqualTo(obj, "foo", get_func()); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-107.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-107.js index 87f7990aaa..95f6f95731 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-107.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-107.js @@ -36,8 +36,9 @@ verifyEqualTo(obj, "foo", get_func()); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-108.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-108.js index cf434bfbd8..63f1b17621 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-108.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-108.js @@ -36,8 +36,9 @@ verifyEqualTo(obj, "foo", get_func()); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-109.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-109.js index 021bf58825..ccce309d3b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-109.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-109.js @@ -44,8 +44,9 @@ verifyEqualTo(obj, "foo", get_func2()); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-110.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-110.js index 1dca6bcb2f..71a658e156 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-110.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-110.js @@ -36,19 +36,21 @@ var properties = { }; Object.defineProperties(obj, properties); -verifyEqualTo(obj, "foo1", 200); -verifyWritable(obj, "foo1"); +verifyProperty(obj, "foo1", { + value: 200, + writable: true, + enumerable: true, + configurable: true, +}); -verifyEnumerable(obj, "foo1"); - -verifyConfigurable(obj, "foo1"); verifyEqualTo(obj, "foo2", get_func()); verifyWritable(obj, "foo2", "setVerifyHelpProp"); -verifyEnumerable(obj, "foo2"); - -verifyConfigurable(obj, "foo2"); +verifyProperty(obj, "foo2", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-114-b.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-114-b.js index dd6222e964..fe50a5bf47 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-114-b.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-114-b.js @@ -24,8 +24,9 @@ verifyEqualTo(arr, "length", 0); verifyWritable(arr, "length", "length", 1); -verifyNotEnumerable(arr, "length"); - -verifyNotConfigurable(arr, "length"); +verifyProperty(arr, "length", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-114.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-114.js index 2afb374774..d11ce306db 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-114.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-114.js @@ -26,8 +26,9 @@ verifyEqualTo(arr, "length", 2); verifyWritable(arr, "length", "length", 5); -verifyNotEnumerable(arr, "length"); - -verifyNotConfigurable(arr, "length"); +verifyProperty(arr, "length", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-115.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-115.js index 239ba3bb3e..7bd6e47c8d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-115.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-115.js @@ -24,10 +24,11 @@ Object.defineProperties(arr, { assert.sameValue(arr.length, 0); arr.length = 2; -assert.sameValue(arr.length, 2); -verifyNotEnumerable(arr, "length"); - -verifyNotConfigurable(arr, "length"); +verifyProperty(arr, "length", { + value: 2, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-12.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-12.js index 0c195e5e0d..323e2e3f49 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-12.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-12.js @@ -26,18 +26,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(fun, "prop", 11); - - verifyNotWritable(fun, "prop"); - - verifyNotEnumerable(fun, "prop"); - - verifyNotConfigurable(fun, "prop"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(fun, "prop", { + value: 11, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-120.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-120.js index 4704109b46..0b7585f683 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-120.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-120.js @@ -19,12 +19,11 @@ Object.defineProperties(arr, { } }); -verifyEqualTo(arr, "length", 0); - -verifyNotWritable(arr, "length"); - -verifyNotEnumerable(arr, "length"); - -verifyNotConfigurable(arr, "length"); +verifyProperty(arr, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-13.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-13.js index be22cb8d81..daf0c3e4ec 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-13.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-13.js @@ -25,18 +25,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "prop", 11); - - verifyNotWritable(arr, "prop"); - - verifyNotEnumerable(arr, "prop"); - - verifyNotConfigurable(arr, "prop"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "prop", { + value: 11, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-14.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-14.js index 3ecd73ab51..3de547f1e7 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-14.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-14.js @@ -25,18 +25,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(str, "prop", 11); - - verifyNotWritable(str, "prop"); - - verifyNotEnumerable(str, "prop"); - - verifyNotConfigurable(str, "prop"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(str, "prop", { + value: 11, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-15.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-15.js index a86aaa2ec5..ede416b548 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-15.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-15.js @@ -26,18 +26,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "prop", 11); - - verifyNotWritable(obj, "prop"); - - verifyNotEnumerable(obj, "prop"); - - verifyNotConfigurable(obj, "prop"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "prop", { + value: 11, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-16.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-16.js index e78dcaa3e2..1e72361437 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-16.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-16.js @@ -26,18 +26,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "prop", 11); - - verifyNotWritable(obj, "prop"); - - verifyNotEnumerable(obj, "prop"); - - verifyNotConfigurable(obj, "prop"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "prop", { + value: 11, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-163.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-163.js index cbe3a65ff3..7359782f32 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-163.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-163.js @@ -24,10 +24,12 @@ Object.defineProperties(arr, { }); //try to overwrite length value of arr -verifyNotWritable(arr, "length") +verifyProperty(arr, "length", { + value: 1, + writable: false, +}); assert(!arr.hasOwnProperty("1")); -assert.sameValue(arr.length, 1); assert.sameValue(arr[0], 0); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-164.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-164.js index f699551ca6..f7bd847919 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-164.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-164.js @@ -31,8 +31,11 @@ try { throw new Test262Error("expected to throw TypeError") } catch (e) { assert(e instanceof TypeError); - assert.sameValue(arr.length, 2); - verifyNotWritable(arr, "length"); } +verifyProperty(arr, "length", { + value: 2, + writable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-176.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-176.js index 7117baebef..cbcebe0b84 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-176.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-176.js @@ -31,11 +31,16 @@ try { throw new Test262Error("Expected to throw TypeError"); } catch (e) { assert(e instanceof TypeError); - assert(arr.hasOwnProperty("1")); - verifyNotWritable(arr, "length"); - assert.sameValue(arr[0], 0); - assert.sameValue(arr[1], 1); - assert.sameValue(arr.length, 2) } +assert(arr.hasOwnProperty("1")); + +verifyProperty(arr, "length", { + value: 2, + writable: false, +}); + +assert.sameValue(arr[0], 0); +assert.sameValue(arr[1], 1); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-177.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-177.js index 1ebd1320be..5bcbd47137 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-177.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-177.js @@ -24,8 +24,11 @@ Object.defineProperties(arr, { }); assert(!arr.hasOwnProperty("1")); -assert.sameValue(arr.length, 0); assert(!arr.hasOwnProperty("0")); -verifyNotWritable(arr, "length"); + +verifyProperty(arr, "length", { + value: 0, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-18.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-18.js index fcd1e5d0d7..0c037c61f7 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-18.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-18.js @@ -26,18 +26,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "prop", 11); - - verifyNotWritable(obj, "prop"); - - verifyNotEnumerable(obj, "prop"); - - verifyNotConfigurable(obj, "prop"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "prop", { + value: 11, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-19.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-19.js index 9d5111dd19..f4a223d68e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-19.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-19.js @@ -26,18 +26,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "prop", 11); - - verifyNotWritable(obj, "prop"); - - verifyNotEnumerable(obj, "prop"); - - verifyNotConfigurable(obj, "prop"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "prop", { + value: 11, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-195.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-195.js index 46e202818f..7ba221bf61 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-195.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-195.js @@ -19,12 +19,11 @@ Object.defineProperties(arr, { } }); -verifyEqualTo(arr, "0", undefined); - -verifyNotWritable(arr, "0"); - -verifyEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: undefined, + writable: false, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-197.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-197.js index c95e92a883..b4b4f90351 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-197.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-197.js @@ -24,8 +24,9 @@ Object.defineProperties(arr, { } }); -assert(arr.hasOwnProperty("0")); -verifyNotWritable(arr, "0"); -assert.sameValue(arr[0], 1001); +verifyProperty(arr, "0", { + value: 1001, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-199.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-199.js index 5d24369753..97417e1683 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-199.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-199.js @@ -24,8 +24,8 @@ Object.defineProperties(arr, { } }); -assert(arr.hasOwnProperty("0")); -verifyNotConfigurable(arr, "0"); -assert(arr.hasOwnProperty("0")); +verifyProperty(arr, "0", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-2.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-2.js index 19de43a79c..883e70de76 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-2.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-2.js @@ -26,12 +26,11 @@ Object.defineProperties(obj, { } }); -verifyEqualTo(obj, "prop", 12); - -verifyNotWritable(obj, "prop"); - -verifyNotEnumerable(obj, "prop"); - -verifyConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + value: 12, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-200.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-200.js index b382c908c7..7c43a21b62 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-200.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-200.js @@ -21,12 +21,11 @@ Object.defineProperties(arr, { } }); -verifyEqualTo(arr, "0", 1001); - -verifyNotWritable(arr, "0"); - -verifyNotEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: 1001, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-202.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-202.js index 6997fab614..8a1c4998e5 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-202.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-202.js @@ -8,6 +8,7 @@ description: > named property, 'P' property doesn't exist in 'O', test [[Set]] of 'P' property in 'Attributes' is set as undefined value if [[Set]] is absent in accessor descriptor 'desc' (15.4.5.1 step 4.c) +includes: [propertyHelper.js] ---*/ var arr = []; @@ -23,24 +24,14 @@ Object.defineProperties(arr, { } }); -var verifyEnumerable = false; -for (var i in arr) { - if (i === "0" && arr.hasOwnProperty("0")) { - verifyEnumerable = true; - } -} - var desc = Object.getOwnPropertyDescriptor(arr, "0"); -var propertyDefineCorrect = arr.hasOwnProperty("0"); -var verifyConfigurable = false; -delete arr[0]; -verifyConfigurable = arr.hasOwnProperty("0"); +verifyProperty(arr, "0", { + enumerable: true, + configurable: true, +}); assert.sameValue(typeof desc.set, "undefined", 'typeof desc.set'); -assert(propertyDefineCorrect, 'propertyDefineCorrect !== true'); assert.sameValue(desc.get, getFunc, 'desc.get'); -assert.sameValue(verifyConfigurable, false, 'verifyConfigurable'); -assert(verifyEnumerable, 'verifyEnumerable !== true'); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-204.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-204.js index ef679dcc11..1cddaa0ff7 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-204.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-204.js @@ -39,6 +39,8 @@ if (arr.verifySetter !== 101) { throw new Test262Error('Expected arr.verifySetter === 101, actually ' + arr.verifySetter); } -verifyNotConfigurable(arr, 0); +verifyProperty(arr, "0", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-205.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-205.js index 46d98ea0a0..1ebeaac1f8 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-205.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-205.js @@ -42,8 +42,9 @@ verifyEqualTo(arr, "0", getFun()); verifyWritable(arr, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-206.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-206.js index a322992ba4..30e0beb774 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-206.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-206.js @@ -18,12 +18,12 @@ arr[0] = 101; // default value of attributes: writable: true, configurable: true Object.defineProperties(arr, { "0": {} }); -verifyEqualTo(arr, "0", 101); -verifyWritable(arr, "0"); - -verifyEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: 101, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-207.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-207.js index 46d88c42e1..19ab6047b9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-207.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-207.js @@ -34,8 +34,9 @@ verifyEqualTo(arr, "0", get_func()); verifyWritable(arr, "0", "setVerifyHelpProp"); -verifyEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-208.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-208.js index 7d7f6ae685..33b1beff19 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-208.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-208.js @@ -24,12 +24,12 @@ Object.defineProperties(arr, { } }); -verifyEqualTo(arr, "0", 100); - -verifyWritable(arr, "0"); - -verifyEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: 100, + writable: true, + enumerable: true, + configurable: true, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-209.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-209.js index 48d71fdc94..1935f25ea8 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-209.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-209.js @@ -38,8 +38,9 @@ verifyEqualTo(arr, "0", get_func()); verifyWritable(arr, "0", "setVerifyHelpProp"); -verifyEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-21.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-21.js index 174de35bac..6f58cf7632 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-21.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-21.js @@ -26,18 +26,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "prop", 11); - - verifyNotWritable(obj, "prop"); - - verifyNotEnumerable(obj, "prop"); - - verifyNotConfigurable(obj, "prop"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "prop", { + value: 11, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-210.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-210.js index 5d74f4dfd0..2809a05d15 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-210.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-210.js @@ -22,12 +22,12 @@ Object.defineProperties(arr, { value: undefined } }); -verifyEqualTo(arr, "0", undefined); -verifyNotWritable(arr, "0"); - -verifyNotEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-211.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-211.js index 163eb6c69f..f1f02085c9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-211.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-211.js @@ -21,12 +21,12 @@ Object.defineProperties(arr, { value: null } }); -verifyEqualTo(arr, "0", null); -verifyNotWritable(arr, "0"); - -verifyNotEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: null, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-212.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-212.js index d6aa9bdf5b..7d32ce4958 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-212.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-212.js @@ -22,12 +22,11 @@ Object.defineProperties(arr, { } }); -verifyEqualTo(arr, "0", NaN); - -verifyNotWritable(arr, "0"); - -verifyNotEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: NaN, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-213.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-213.js index b9bff48f9d..000b189084 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-213.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-213.js @@ -24,18 +24,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "0", -0); - - verifyNotWritable(arr, "0"); - - verifyNotEnumerable(arr, "0"); - - verifyNotConfigurable(arr, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "0", { + value: -0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-214.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-214.js index 356f64d1bd..934d03d507 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-214.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-214.js @@ -24,18 +24,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "0", +0); - - verifyNotWritable(arr, "0"); - - verifyNotEnumerable(arr, "0"); - - verifyNotConfigurable(arr, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "0", { + value: +0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-215.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-215.js index ea5c1a2d3f..4cc0c47522 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-215.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-215.js @@ -22,12 +22,12 @@ Object.defineProperties(arr, { value: 101 } }); -verifyEqualTo(arr, "0", 101); -verifyNotWritable(arr, "0"); - -verifyNotEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: 101, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-216.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-216.js index b658b05038..bda83e12a4 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-216.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-216.js @@ -22,12 +22,12 @@ Object.defineProperties(arr, { value: "abcd" } }); -verifyEqualTo(arr, "0", "abcd"); -verifyNotWritable(arr, "0"); - -verifyNotEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: "abcd", + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-217.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-217.js index 94e975a2cb..cf81d69f53 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-217.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-217.js @@ -22,12 +22,12 @@ Object.defineProperties(arr, { value: true } }); -verifyEqualTo(arr, "0", true); -verifyNotWritable(arr, "0"); - -verifyNotEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: true, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-218.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-218.js index 9fefdec9a6..c8998fdd88 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-218.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-218.js @@ -27,12 +27,12 @@ var properties = { }; Object.defineProperties(arr, properties); -verifyEqualTo(arr, "0", obj1); -verifyNotWritable(arr, "0"); - -verifyNotEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: obj1, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-219.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-219.js index 50afb5f2b0..7e53f2f81f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-219.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-219.js @@ -21,12 +21,12 @@ Object.defineProperties(arr, { writable: true } }); -verifyEqualTo(arr, "0", undefined); -verifyWritable(arr, "0"); - -verifyNotEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: undefined, + writable: true, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-220.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-220.js index e655774ae2..b6a031738f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-220.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-220.js @@ -22,12 +22,12 @@ Object.defineProperties(arr, { writable: false } }); -verifyEqualTo(arr, "0", undefined); -verifyNotWritable(arr, "0"); - -verifyNotEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: undefined, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-221.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-221.js index f3d107084e..a2ee179aba 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-221.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-221.js @@ -28,8 +28,9 @@ Object.defineProperties(arr, { }); verifyEqualTo(arr, "0", get_func()); -verifyNotEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-222.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-222.js index b9f60bdb8f..eaaf719083 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-222.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-222.js @@ -28,8 +28,9 @@ Object.defineProperties(arr, { }); verifyWritable(arr, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-223.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-223.js index 25c4ab4089..f66435c528 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-223.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-223.js @@ -21,12 +21,12 @@ Object.defineProperties(arr, { enumerable: true } }); -verifyEqualTo(arr, "0", undefined); -verifyNotWritable(arr, "0"); - -verifyEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: undefined, + writable: false, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-224.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-224.js index 127f8f89dd..e27cf9f8dd 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-224.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-224.js @@ -22,12 +22,12 @@ Object.defineProperties(arr, { enumerable: false } }); -verifyEqualTo(arr, "0", undefined); -verifyNotWritable(arr, "0"); - -verifyNotEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: undefined, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-225.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-225.js index 9db9a3514d..ecd4214862 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-225.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-225.js @@ -21,12 +21,12 @@ Object.defineProperties(arr, { configurable: true } }); -verifyEqualTo(arr, "0", undefined); -verifyNotWritable(arr, "0"); - -verifyNotEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: undefined, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-226.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-226.js index 0b839c70e3..783378d959 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-226.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-226.js @@ -21,12 +21,12 @@ Object.defineProperties(arr, { configurable: false } }); -verifyEqualTo(arr, "0", undefined); -verifyNotWritable(arr, "0"); - -verifyNotEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-227.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-227.js index 7e0a0eb3b8..2df44c3abe 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-227.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-227.js @@ -27,18 +27,16 @@ try { } }); } catch (e) { - verifyEqualTo(arr, "1", 3); - - verifyNotWritable(arr, "1"); - - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + value: 3, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-228.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-228.js index ae93f23bb1..66fcadb131 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-228.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-228.js @@ -31,18 +31,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "1", 3); - - verifyNotWritable(arr, "1"); - - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + value: 3, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-229.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-229.js index 52eeb0b5ef..08df4167f5 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-229.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-229.js @@ -35,14 +35,14 @@ try { } catch (e) { verifyWritable(arr, "1", "setVerifyHelpProp"); - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-230.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-230.js index 70c1ebbcab..5b385533ed 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-230.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-230.js @@ -27,18 +27,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "1", 3); - - verifyNotWritable(arr, "1"); - - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + value: 3, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-231.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-231.js index 77e43c731c..58ab02eb54 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-231.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-231.js @@ -27,8 +27,9 @@ Object.defineProperties(arr, { verifyWritable(arr, "1", "setVerifyHelpProp"); -verifyEnumerable(arr, "1"); - -verifyConfigurable(arr, "1"); +verifyProperty(arr, "1", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-232.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-232.js index a8f2187f8c..f585634fa1 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-232.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-232.js @@ -28,12 +28,11 @@ Object.defineProperties(arr, { } }); -verifyEqualTo(arr, "1", 12); - -verifyNotWritable(arr, "1"); - -verifyNotEnumerable(arr, "1"); - -verifyConfigurable(arr, "1"); +verifyProperty(arr, "1", { + value: 12, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-233.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-233.js index cc3247a9c7..5aa8ecd912 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-233.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-233.js @@ -30,18 +30,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "1", undefined); - - verifyNotWritable(arr, "1"); - - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-234.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-234.js index 668e02eb0f..15279c0e89 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-234.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-234.js @@ -32,18 +32,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "1", 3); - - verifyNotWritable(arr, "1"); - - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + value: 3, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-235.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-235.js index a4becc4796..63526b84e9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-235.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-235.js @@ -26,18 +26,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "1", +0); - - verifyNotWritable(arr, "1"); - - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + value: +0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-236.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-236.js index 7a76261002..8ccd912ed0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-236.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-236.js @@ -27,18 +27,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "1", -0); - - verifyNotWritable(arr, "1"); - - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + value: -0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-237.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-237.js index 9914b27c44..5332d11ce9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-237.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-237.js @@ -28,18 +28,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "1", 12); - - verifyNotWritable(arr, "1"); - - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + value: 12, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-238.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-238.js index 5928b5b299..5e6177b726 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-238.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-238.js @@ -27,18 +27,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "1", "abcd"); - - verifyNotWritable(arr, "1"); - - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + value: "abcd", + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-239.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-239.js index e27cf66f6e..a696416afe 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-239.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-239.js @@ -28,18 +28,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "1", true); - - verifyNotWritable(arr, "1"); - - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + value: true, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-24.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-24.js index f57eb5d1db..8b95fea263 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-24.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-24.js @@ -24,13 +24,12 @@ Object.defineProperties(this, { } }); -verifyEqualTo(this, "prop", 12); - -verifyWritable(this, "prop"); - -verifyEnumerable(this, "prop"); - -verifyConfigurable(this, "prop"); +verifyProperty(this, "prop", { + value: 12, + writable: true, + enumerable: true, + configurable: true, +}); delete this.prop; diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-240.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-240.js index 3e22e8bf14..ce8c4c36a6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-240.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-240.js @@ -34,18 +34,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "1", obj1); - - verifyNotWritable(arr, "1"); - - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + value: obj1, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-241.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-241.js index 6167a6ee64..17bb7efd40 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-241.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-241.js @@ -34,14 +34,14 @@ try { } catch (e) { verifyWritable(arr, "1", "setVerifyHelpProp"); - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-242.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-242.js index a794b04f0d..937341c5a5 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-242.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-242.js @@ -33,14 +33,14 @@ try { } catch (e) { verifyWritable(arr, "1", "setVerifyHelpProp"); - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-243.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-243.js index 4f8ba301c4..9f1b7a70a2 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-243.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-243.js @@ -25,8 +25,9 @@ Object.defineProperties(arr, { } }); -verifyNotEnumerable(arr, "1"); - -verifyNotConfigurable(arr, "1"); +verifyProperty(arr, "1", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-244.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-244.js index 12d578b86f..4b7394ea5b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-244.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-244.js @@ -36,14 +36,14 @@ try { } catch (e) { verifyEqualTo(arr, "1", get_fun()); - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-245.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-245.js index 046fc367f8..bb8670ee80 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-245.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-245.js @@ -32,14 +32,14 @@ try { } catch (e) { verifyEqualTo(arr, "1", get_fun()); - verifyNotEnumerable(arr, "1"); - - verifyNotConfigurable(arr, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "1", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-246.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-246.js index f7bd329a1e..193596163a 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-246.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-246.js @@ -26,8 +26,9 @@ Object.defineProperties(arr, { } }); -verifyNotEnumerable(arr, "1"); - -verifyNotConfigurable(arr, "1"); +verifyProperty(arr, "1", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-247.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-247.js index f597aaf1af..99151a6eb0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-247.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-247.js @@ -19,12 +19,12 @@ Object.defineProperties(arr, { value: 36 } }); -verifyEqualTo(arr, "0", 36); -verifyWritable(arr, "0"); - -verifyEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: 36, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-248.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-248.js index 547713544d..a5ec7a2b73 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-248.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-248.js @@ -19,12 +19,12 @@ Object.defineProperties(arr, { value: undefined } }); -verifyEqualTo(arr, "0", undefined); -verifyWritable(arr, "0"); - -verifyEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: undefined, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-249.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-249.js index 36907737c5..8a3179cc5b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-249.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-249.js @@ -19,12 +19,12 @@ Object.defineProperties(arr, { value: 12 } }); -verifyEqualTo(arr, "0", 12); -verifyWritable(arr, "0"); - -verifyEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: 12, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-250.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-250.js index f247cfd64b..5332c7076e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-250.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-250.js @@ -19,12 +19,12 @@ Object.defineProperties(arr, { writable: false } }); -verifyEqualTo(arr, "0", 100); -verifyNotWritable(arr, "0"); - -verifyEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: 100, + writable: false, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-251.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-251.js index d8e2e29bf4..1ffc966b9f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-251.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-251.js @@ -19,12 +19,12 @@ Object.defineProperties(arr, { enumerable: false } }); -verifyEqualTo(arr, "0", 12); -verifyWritable(arr, "0"); - -verifyNotEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: 12, + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-252.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-252.js index c74dba3fb4..dea3971ab4 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-252.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-252.js @@ -19,12 +19,12 @@ Object.defineProperties(arr, { configurable: false } }); -verifyEqualTo(arr, "0", 12); -verifyWritable(arr, "0"); - -verifyEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: 12, + writable: true, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-253.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-253.js index bec2effb09..4ec4199c2a 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-253.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-253.js @@ -21,12 +21,12 @@ Object.defineProperties(arr, { configurable: false } }); -verifyEqualTo(arr, "0", 36); -verifyNotWritable(arr, "0"); - -verifyEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + value: 36, + writable: false, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-254.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-254.js index 5ff7603393..52dfbc2240 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-254.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-254.js @@ -32,8 +32,9 @@ Object.defineProperties(arr, { }); verifyEqualTo(arr, "0", get_fun()); -verifyNotEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-255.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-255.js index ca5c0bb33f..e10cec2a3f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-255.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-255.js @@ -26,8 +26,10 @@ Object.defineProperties(arr, { get: undefined } }); -verifyNotEnumerable(arr, "0"); -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-256.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-256.js index 5f2eec519b..5578340283 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-256.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-256.js @@ -30,8 +30,9 @@ Object.defineProperties(arr, { }); verifyEqualTo(arr, "0", get_fun()); -verifyNotEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-257.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-257.js index 24ebf36025..6400a30657 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-257.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-257.js @@ -30,8 +30,9 @@ Object.defineProperties(arr, { }); verifyWritable(arr, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-258.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-258.js index 0cb48c5eb7..45d2f9322b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-258.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-258.js @@ -24,8 +24,10 @@ Object.defineProperties(arr, { set: undefined } }); -verifyNotEnumerable(arr, "0"); -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-259.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-259.js index 0e846489aa..9ea293761b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-259.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-259.js @@ -29,8 +29,9 @@ Object.defineProperties(arr, { }); verifyWritable(arr, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-260.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-260.js index 62e09ab0f2..441fd014bf 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-260.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-260.js @@ -30,8 +30,9 @@ Object.defineProperties(arr, { }); verifyWritable(arr, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arr, "0"); - -verifyConfigurable(arr, "0"); +verifyProperty(arr, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-261.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-261.js index 3a4aeaac10..a89d450ef1 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-261.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-261.js @@ -29,8 +29,9 @@ Object.defineProperties(arr, { }); verifyWritable(arr, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-262.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-262.js index ee319f6ff2..6ba5bf8bfc 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-262.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-262.js @@ -41,8 +41,9 @@ verifyEqualTo(arr, "0", get_fun()); verifyWritable(arr, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arr, "0"); - -verifyNotConfigurable(arr, "0"); +verifyProperty(arr, "0", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-266.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-266.js index 689bec9b21..a81edc844e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-266.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-266.js @@ -22,13 +22,13 @@ Object.defineProperties(arr, { configurable: true } }); -verifyEqualTo(arr, "property", 12); -verifyWritable(arr, "property"); - -verifyEnumerable(arr, "property"); - -verifyConfigurable(arr, "property"); +verifyProperty(arr, "property", { + value: 12, + writable: true, + enumerable: true, + configurable: true, +}); if (arr.length !== 0) { throw new Test262Error('Expected arr.length === 0, actually ' + arr.length); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-267.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-267.js index c81aad2b3f..293f8f33a6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-267.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-267.js @@ -33,9 +33,10 @@ verifyEqualTo(arr, "property", get_fun()); verifyWritable(arr, "property", "setVerifyHelpProp"); -verifyEnumerable(arr, "property"); - -verifyConfigurable(arr, "property"); +verifyProperty(arr, "property", { + enumerable: true, + configurable: true, +}); if (arr.length !== 0) { throw new Test262Error('Expected arr.length === 0, actually ' + arr.length); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-268.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-268.js index 3f27c8552a..6ef189d40f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-268.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-268.js @@ -38,8 +38,9 @@ verifyEqualTo(arr, "property", get_fun()); verifyWritable(arr, "property", "verifySetFun"); -verifyNotEnumerable(arr, "property"); - -verifyConfigurable(arr, "property"); +verifyProperty(arr, "property", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-269.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-269.js index 217cd5b052..24d9bf430e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-269.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-269.js @@ -21,13 +21,13 @@ Object.defineProperties(arr, { configurable: false } }); -verifyEqualTo(arr, "property", 12); -verifyNotWritable(arr, "property"); - -verifyNotEnumerable(arr, "property"); - -verifyNotConfigurable(arr, "property"); +verifyProperty(arr, "property", { + value: 12, + writable: false, + enumerable: false, + configurable: false, +}); if (arr.length !== 0) { throw new Test262Error('Expected arr.length === 0, actually ' + arr.length); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-270.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-270.js index 1fb83b1df8..2750ef8cbd 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-270.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-270.js @@ -26,18 +26,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "property", 12); - - verifyNotWritable(arr, "property"); - - verifyNotEnumerable(arr, "property"); - - verifyNotConfigurable(arr, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "property", { + value: 12, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-271.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-271.js index 01af4ede13..9ebe3f3c87 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-271.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-271.js @@ -26,18 +26,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "property", undefined); - - verifyNotWritable(arr, "property"); - - verifyNotEnumerable(arr, "property"); - - verifyNotConfigurable(arr, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "property", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-272.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-272.js index 1235a3604d..8bff8fee16 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-272.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-272.js @@ -27,18 +27,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "property", 12); - - verifyNotWritable(arr, "property"); - - verifyNotEnumerable(arr, "property"); - - verifyNotConfigurable(arr, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "property", { + value: 12, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-273.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-273.js index 9d8807a77f..0108cff387 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-273.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-273.js @@ -26,18 +26,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arr, "property", 12); - - verifyNotWritable(arr, "property"); - - verifyNotEnumerable(arr, "property"); - - verifyNotConfigurable(arr, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "property", { + value: 12, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-274.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-274.js index 87b8c4cb9a..0cab0ced4b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-274.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-274.js @@ -39,14 +39,14 @@ try { verifyWritable(arr, "property", "verifySetFun"); - verifyNotEnumerable(arr, "property"); - - verifyNotConfigurable(arr, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "property", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-275.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-275.js index 73a3eb6ff6..7a13d69ddc 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-275.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-275.js @@ -30,14 +30,14 @@ try { } catch (e) { verifyWritable(arr, "property", "setVerifyHelpProp"); - verifyNotEnumerable(arr, "property"); - - verifyNotConfigurable(arr, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "property", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-276.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-276.js index 4f44eedb27..cc4b257824 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-276.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-276.js @@ -32,14 +32,14 @@ try { } catch (e) { verifyWritable(arr, "property", "setVerifyHelpProp"); - verifyNotEnumerable(arr, "property"); - - verifyNotConfigurable(arr, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "property", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-277.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-277.js index 6015feab01..88cd60fb56 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-277.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-277.js @@ -32,14 +32,14 @@ try { } catch (e) { verifyWritable(arr, "property", "setVerifyHelpProp"); - verifyNotEnumerable(arr, "property"); - - verifyNotConfigurable(arr, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arr, "property", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-278.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-278.js index ee646acae0..380cbf887c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-278.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-278.js @@ -30,12 +30,11 @@ Object.defineProperties(arg, { } }); -verifyEqualTo(arg, "0", 10); - -verifyWritable(arg, "0"); - -verifyEnumerable(arg, "0"); - -verifyConfigurable(arg, "0"); +verifyProperty(arg, "0", { + value: 10, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-279.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-279.js index 69aff91049..a225f9458f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-279.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-279.js @@ -42,8 +42,9 @@ verifyEqualTo(arg, "0", get_func()); verifyWritable(arg, "0", "setVerifyHelpProp"); -verifyEnumerable(arg, "0"); - -verifyConfigurable(arg, "0"); +verifyProperty(arg, "0", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-28.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-28.js index 1b1b00f14b..f46733e9b5 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-28.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-28.js @@ -18,14 +18,9 @@ Object.defineProperties(obj, { } }); -verifyNotWritable(obj, "prop"); - -if (!obj.hasOwnProperty("prop")) { - throw new Test262Error('Expected obj.hasOwnProperty("prop") to be true, actually ' + obj.hasOwnProperty("prop")); -} - -if (obj.prop !== 1001) { - throw new Test262Error('Expected obj.prop === 1001, actually ' + obj.prop); -} +verifyProperty(obj, "prop", { + value: 1001, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-281.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-281.js index 4df7240d9c..87f70353e5 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-281.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-281.js @@ -27,12 +27,11 @@ Object.defineProperties(arg, { } }); -verifyEqualTo(arg, "0", 20); - -verifyNotWritable(arg, "0"); - -verifyNotEnumerable(arg, "0"); - -verifyNotConfigurable(arg, "0"); +verifyProperty(arg, "0", { + value: 20, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-282.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-282.js index 11d6e36781..10322f5329 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-282.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-282.js @@ -34,18 +34,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arg, "0", 0); - - verifyNotWritable(arg, "0"); - - verifyEnumerable(arg, "0"); - - verifyNotConfigurable(arg, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "0", { + value: 0, + writable: false, + enumerable: true, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-283.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-283.js index 8ac9b4f704..ccdf040553 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-283.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-283.js @@ -35,18 +35,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arg, "0", 0); - - verifyNotWritable(arg, "0"); - - verifyNotEnumerable(arg, "0"); - - verifyNotConfigurable(arg, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "0", { + value: 0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-284.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-284.js index 9fed19833a..6a449ac3d9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-284.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-284.js @@ -35,18 +35,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arg, "0", 0); - - verifyNotWritable(arg, "0"); - - verifyEnumerable(arg, "0"); - - verifyNotConfigurable(arg, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "0", { + value: 0, + writable: false, + enumerable: true, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-285.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-285.js index a22f1a59ba..b375ce09a4 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-285.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-285.js @@ -35,18 +35,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arg, "0", 0); - - verifyNotWritable(arg, "0"); - - verifyNotEnumerable(arg, "0"); - - verifyNotConfigurable(arg, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "0", { + value: 0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-288.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-288.js index a5a2feeecd..bb2843f668 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-288.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-288.js @@ -40,14 +40,14 @@ try { } catch (e) { verifyEqualTo(arg, "0", get_func()); - verifyEnumerable(arg, "0"); - - verifyNotConfigurable(arg, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "0", { + enumerable: true, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-289.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-289.js index 58daa19af6..b6ce95181d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-289.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-289.js @@ -40,14 +40,14 @@ try { } catch (e) { verifyEqualTo(arg, "0", get_func()); - verifyEnumerable(arg, "0"); - - verifyNotConfigurable(arg, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "0", { + enumerable: true, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-290.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-290.js index f03e73674a..0b8e42adfe 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-290.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-290.js @@ -30,12 +30,11 @@ Object.defineProperties(arg, { } }); -verifyEqualTo(arg, "0", 10); - -verifyNotWritable(arg, "0"); - -verifyNotEnumerable(arg, "0"); - -verifyNotConfigurable(arg, "0"); +verifyProperty(arg, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-291.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-291.js index 1319ec70c2..db6f500445 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-291.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-291.js @@ -42,8 +42,9 @@ verifyEqualTo(arg, "0", get_func()); verifyWritable(arg, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arg, "0"); - -verifyNotConfigurable(arg, "0"); +verifyProperty(arg, "0", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-292.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-292.js index a03cfd2060..b46f0bc120 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-292.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-292.js @@ -43,8 +43,9 @@ Object.defineProperties(arg, { verifyEqualTo(arg, "0", get_func2()); -verifyNotEnumerable(arg, "0"); - -verifyNotConfigurable(arg, "0"); +verifyProperty(arg, "0", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-293.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-293.js index 5d9589888b..7267e28935 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-293.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-293.js @@ -28,12 +28,11 @@ Object.defineProperties(arg, { } }); -verifyEqualTo(arg, "0", 20); - -verifyNotWritable(arg, "0"); - -verifyNotEnumerable(arg, "0"); - -verifyNotConfigurable(arg, "0"); +verifyProperty(arg, "0", { + value: 20, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-294.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-294.js index e1af163e2b..efa1e26fb6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-294.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-294.js @@ -34,18 +34,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arg, "0", 0); - - verifyNotWritable(arg, "0"); - - verifyNotEnumerable(arg, "0"); - - verifyNotConfigurable(arg, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "0", { + value: 0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-295.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-295.js index 995e695b60..e6fc9e9422 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-295.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-295.js @@ -35,18 +35,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arg, "0", 0); - - verifyNotWritable(arg, "0"); - - verifyNotEnumerable(arg, "0"); - - verifyNotConfigurable(arg, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "0", { + value: 0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-296.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-296.js index d63b6abd7c..ee14307684 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-296.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-296.js @@ -35,18 +35,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arg, "0", 0); - - verifyNotWritable(arg, "0"); - - verifyEnumerable(arg, "0"); - - verifyNotConfigurable(arg, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "0", { + value: 0, + writable: false, + enumerable: true, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-297.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-297.js index 85a07ad038..d647c69fc9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-297.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-297.js @@ -35,18 +35,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arg, "0", 0); - - verifyNotWritable(arg, "0"); - - verifyNotEnumerable(arg, "0"); - - verifyNotConfigurable(arg, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "0", { + value: 0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-298.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-298.js index 2bb794f123..82f75ed8d5 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-298.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-298.js @@ -42,14 +42,14 @@ try { } catch (e) { verifyEqualTo(arg, "0", get_func1()); - verifyNotEnumerable(arg, "0"); - - verifyNotConfigurable(arg, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "0", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-299.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-299.js index 2e59611209..f3cf964f13 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-299.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-299.js @@ -43,14 +43,14 @@ try { } catch (e) { verifyEqualTo(arg, "0", get_func()); - verifyNotEnumerable(arg, "0"); - - verifyNotConfigurable(arg, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "0", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-30.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-30.js index bba5d89ff4..580dcaf3da 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-30.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-30.js @@ -19,14 +19,9 @@ Object.defineProperties(obj, { } }); -verifyNotConfigurable(obj, "prop"); - -if (!obj.hasOwnProperty("prop")) { - throw new Test262Error('Expected obj.hasOwnProperty("prop") to be true, actually ' + obj.hasOwnProperty("prop")); -} - -if (obj.prop !== 1001) { - throw new Test262Error('Expected obj.prop === 1001, actually ' + obj.prop); -} +verifyProperty(obj, "prop", { + value: 1001, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-300.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-300.js index 7c10d4efa7..4eb41d999f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-300.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-300.js @@ -39,14 +39,14 @@ try { } catch (e) { verifyEqualTo(arg, "0", get_func()); - verifyEnumerable(arg, "0"); - - verifyNotConfigurable(arg, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "0", { + enumerable: true, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-301.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-301.js index 607a3a746d..1dc7c3747d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-301.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-301.js @@ -39,14 +39,14 @@ try { } catch (e) { verifyEqualTo(arg, "0", get_func()); - verifyEnumerable(arg, "0"); - - verifyNotConfigurable(arg, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "0", { + enumerable: true, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-302.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-302.js index 16f710cd40..3e5bee3cc9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-302.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-302.js @@ -24,12 +24,11 @@ Object.defineProperties(arg, { } }); -verifyEqualTo(arg, "genericProperty", 1001); - -verifyWritable(arg, "genericProperty"); - -verifyEnumerable(arg, "genericProperty"); - -verifyConfigurable(arg, "genericProperty"); +verifyProperty(arg, "genericProperty", { + value: 1001, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-303.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-303.js index f3f32aab1c..91719ca75f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-303.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-303.js @@ -35,8 +35,9 @@ verifyEqualTo(arg, "genericProperty", getFun()); verifyWritable(arg, "genericProperty", "testGetFunction"); -verifyEnumerable(arg, "genericProperty"); - -verifyConfigurable(arg, "genericProperty"); +verifyProperty(arg, "genericProperty", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-304.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-304.js index e5168c7d84..955fc46f5a 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-304.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-304.js @@ -46,8 +46,9 @@ verifyEqualTo(arg, "genericProperty", getFun()); verifyWritable(arg, "genericProperty", "testGetFunction"); -verifyNotEnumerable(arg, "genericProperty"); - -verifyNotConfigurable(arg, "genericProperty"); +verifyProperty(arg, "genericProperty", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-305.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-305.js index 4863298678..2c8528dee0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-305.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-305.js @@ -30,12 +30,11 @@ Object.defineProperties(arg, { } }); -verifyEqualTo(arg, "genericProperty", 1002); - -verifyWritable(arg, "genericProperty"); - -verifyNotEnumerable(arg, "genericProperty"); - -verifyNotConfigurable(arg, "genericProperty"); +verifyProperty(arg, "genericProperty", { + value: 1002, + writable: true, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-306.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-306.js index 5674c28b7d..7fa55bce0e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-306.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-306.js @@ -30,18 +30,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arg, "genericProperty", 1001); - - verifyNotWritable(arg, "genericProperty"); - - verifyNotEnumerable(arg, "genericProperty"); - - verifyNotConfigurable(arg, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "genericProperty", { + value: 1001, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-307.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-307.js index f1294cc7e8..7b6840796d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-307.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-307.js @@ -29,18 +29,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arg, "genericProperty", undefined); - - verifyNotWritable(arg, "genericProperty"); - - verifyNotEnumerable(arg, "genericProperty"); - - verifyNotConfigurable(arg, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "genericProperty", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-308.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-308.js index f905ee306c..49be313a95 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-308.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-308.js @@ -29,18 +29,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arg, "genericProperty", undefined); - - verifyNotWritable(arg, "genericProperty"); - - verifyEnumerable(arg, "genericProperty"); - - verifyNotConfigurable(arg, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "genericProperty", { + value: undefined, + writable: false, + enumerable: true, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-309.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-309.js index fc7e123d7a..20e70b72df 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-309.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-309.js @@ -28,18 +28,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arg, "genericProperty", undefined); - - verifyNotWritable(arg, "genericProperty"); - - verifyNotEnumerable(arg, "genericProperty"); - - verifyNotConfigurable(arg, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "genericProperty", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-31.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-31.js index 3e0d7399be..1cc9e68036 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-31.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-31.js @@ -19,12 +19,12 @@ Object.defineProperties(obj, { configurable: false } }); -verifyEqualTo(obj, "prop", 1002); -verifyNotWritable(obj, "prop"); - -verifyNotEnumerable(obj, "prop"); - -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + value: 1002, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-310.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-310.js index a62ee445a7..51326cbe7f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-310.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-310.js @@ -43,14 +43,14 @@ try { verifyWritable(arg, "genericProperty", "verifySetFun"); - verifyNotEnumerable(arg, "genericProperty"); - - verifyNotConfigurable(arg, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "genericProperty", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-311.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-311.js index b5fd0b53f7..e43c360b87 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-311.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-311.js @@ -36,14 +36,14 @@ try { } catch (e) { verifyWritable(arg, "genericProperty", "genericPropertyString"); - verifyNotEnumerable(arg, "genericProperty"); - - verifyNotConfigurable(arg, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "genericProperty", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-312.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-312.js index a890c971e3..1612b14adb 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-312.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-312.js @@ -35,14 +35,14 @@ try { } catch (e) { verifyWritable(arg, "genericProperty", "genericPropertyString"); - verifyEnumerable(arg, "genericProperty"); - - verifyNotConfigurable(arg, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "genericProperty", { + enumerable: true, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-313.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-313.js index 8a0992330e..aa51e97ee2 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-313.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-313.js @@ -34,14 +34,14 @@ try { } catch (e) { verifyWritable(arg, "genericProperty", "genericPropertyString"); - verifyNotEnumerable(arg, "genericProperty"); - - verifyNotConfigurable(arg, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arg, "genericProperty", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-33.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-33.js index c1c992a90d..25c528e02d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-33.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-33.js @@ -24,8 +24,9 @@ Object.defineProperties(obj, { }); verifyWritable(obj, "prop", "setVerifyHelpProp"); -verifyEnumerable(obj, "prop"); - -verifyConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-35.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-35.js index 5ec06c05ef..394f63ff5f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-35.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-35.js @@ -29,8 +29,9 @@ verifyEqualTo(obj, "prop", getFun()); verifyWritable(obj, "prop", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "prop"); - -verifyConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-36.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-36.js index cd1476eaea..7089f666f5 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-36.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-36.js @@ -30,8 +30,9 @@ verifyEqualTo(obj, "prop", 10); verifyWritable(obj, "prop", "setVerifyHelpProp"); -verifyEnumerable(obj, "prop"); - -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-37.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-37.js index afdb5a5709..466884a968 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-37.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-37.js @@ -29,8 +29,9 @@ verifyEqualTo(obj, "prop", getFun()); verifyWritable(obj, "prop", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "prop"); - -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-38-1.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-38-1.js index 97d92d286c..c5c609ad79 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-38-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-38-1.js @@ -29,8 +29,9 @@ Object.defineProperties(obj, { verifyEqualTo(obj, "foo", getFunc()); -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-38.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-38.js index d687d6345e..9bd8a38c7c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-38.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-38.js @@ -17,12 +17,12 @@ obj.foo = 100; // default value of attributes: writable: true, configurable: tru Object.defineProperties(obj, { foo: {} }); -verifyEqualTo(obj, "foo", 100); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 100, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-39.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-39.js index 54c402d74f..ff7d19a48f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-39.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-39.js @@ -22,12 +22,12 @@ Object.defineProperties(obj, { configurable: true } }); -verifyEqualTo(obj, "foo", 101); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 101, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-40.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-40.js index 6c0d2f2c8a..948a61d092 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-40.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-40.js @@ -40,8 +40,9 @@ verifyEqualTo(obj, "foo", get_func()); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-41.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-41.js index f7d9be5dc4..a41d70fd83 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-41.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-41.js @@ -19,12 +19,12 @@ Object.defineProperties(obj, { value: "102" } }); -verifyEqualTo(obj, "foo", "102"); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: "102", + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-42.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-42.js index 26da7ca748..4971c08a34 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-42.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-42.js @@ -22,12 +22,12 @@ Object.defineProperties(obj, { value: undefined } }); -verifyEqualTo(obj, "foo", undefined); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-43.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-43.js index f31e75dbed..53be56ca55 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-43.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-43.js @@ -22,12 +22,12 @@ Object.defineProperties(obj, { value: null } }); -verifyEqualTo(obj, "foo", null); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: null, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-44.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-44.js index ce699a71b2..895b21043b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-44.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-44.js @@ -23,8 +23,10 @@ Object.defineProperties(obj, { } }); -verifyNotEnumerable(obj, "foo"); -verifyNotWritable(obj, "foo"); -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-45.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-45.js index 5738385a85..765e5e3226 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-45.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-45.js @@ -25,18 +25,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", -0); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: -0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-46.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-46.js index 5b7397c87e..3f57029fbc 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-46.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-46.js @@ -25,18 +25,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", +0); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: +0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-47.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-47.js index 3cbc638a8b..871d859a41 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-47.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-47.js @@ -22,12 +22,12 @@ Object.defineProperties(obj, { value: 101 } }); -verifyEqualTo(obj, "foo", 101); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 101, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-48.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-48.js index b3de13ed9d..eb530fdff3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-48.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-48.js @@ -19,12 +19,12 @@ Object.defineProperties(obj, { value: 102 } }); -verifyEqualTo(obj, "foo", 102); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 102, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-49.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-49.js index 5cb4ac2df9..73beacbde0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-49.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-49.js @@ -23,12 +23,12 @@ Object.defineProperties(obj, { value: "abcd" } }); -verifyEqualTo(obj, "foo", "abcd"); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: "abcd", + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-5.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-5.js index 5893ad38d2..1cf2293e27 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-5.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-5.js @@ -29,16 +29,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "prop", getFunc()); - - verifyNotEnumerable(obj, "prop"); - - verifyNotConfigurable(obj, "prop"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyEqualTo(obj, "prop", getFunc()); + +verifyProperty(obj, "prop", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-50.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-50.js index c4459a802e..2e7473cada 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-50.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-50.js @@ -19,12 +19,12 @@ Object.defineProperties(obj, { value: "fghj" } }); -verifyEqualTo(obj, "foo", "fghj"); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: "fghj", + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-51.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-51.js index eaeb92e3c7..cf927bc359 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-51.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-51.js @@ -22,12 +22,12 @@ Object.defineProperties(obj, { value: true } }); -verifyEqualTo(obj, "foo", true); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: true, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-52.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-52.js index 294565851e..ad4217d829 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-52.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-52.js @@ -19,12 +19,12 @@ Object.defineProperties(obj, { value: false } }); -verifyEqualTo(obj, "foo", false); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: false, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-53.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-53.js index 47a8e4d761..d9a27c8f94 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-53.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-53.js @@ -25,12 +25,12 @@ Object.defineProperties(obj, { value: obj1 } }); -verifyEqualTo(obj, "foo", obj1); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: obj1, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-54.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-54.js index 0c154f563f..b0fc54d4af 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-54.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-54.js @@ -26,12 +26,12 @@ Object.defineProperties(obj, { value: obj2 } }); -verifyEqualTo(obj, "foo", obj2); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: obj2, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-55.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-55.js index 3db7ea5160..da79965576 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-55.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-55.js @@ -22,12 +22,12 @@ Object.defineProperties(obj, { writable: false } }); -verifyEqualTo(obj, "foo", undefined); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-56.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-56.js index c5e8d07b24..8925a1c6a6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-56.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-56.js @@ -24,12 +24,12 @@ Object.defineProperties(obj, { configurable: true } }); -verifyEqualTo(obj, "foo", undefined); -verifyWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-57.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-57.js index 07a9774921..f257a3fa8a 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-57.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-57.js @@ -26,9 +26,11 @@ Object.defineProperties(obj, { } }); -verifyNotEnumerable(obj, "foo"); assert.sameValue(obj.foo, 10); -verifyNotConfigurable(obj, "foo") +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-58.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-58.js index c774825fb6..2bdb06848a 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-58.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-58.js @@ -6,6 +6,7 @@ es5id: 15.2.3.7-6-a-58 description: > Object.defineProperties - desc.[[Get]] and P.[[Get]] are two objects which refer to the different objects (8.12.9 step 6) +includes: [propertyHelper.js] ---*/ var obj = {}; @@ -29,25 +30,15 @@ Object.defineProperties(obj, { } }); -var verifyEnumerable = false; -for (var p in obj) { - if (p === "foo") { - verifyEnumerable = true; - } -} - -var verifyValue = false; -verifyValue = (obj.foo === 20); +assert.sameValue(obj.foo, 20); var desc = Object.getOwnPropertyDescriptor(obj, "foo"); -var verifyConfigurable = false; -delete obj.foo; -verifyConfigurable = obj.hasOwnProperty("foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: true, +}); -assert.sameValue(verifyConfigurable, false, 'verifyConfigurable'); -assert.sameValue(verifyEnumerable, false, 'verifyEnumerable'); -assert(verifyValue, 'verifyValue !== true'); assert.sameValue(typeof(desc.set), "undefined", 'typeof (desc.set)'); assert.sameValue(desc.get, get_Func2, 'desc.get'); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-59.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-59.js index 55f0b6e98b..c6ef06f2f7 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-59.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-59.js @@ -27,8 +27,9 @@ Object.defineProperties(obj, { }); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-60.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-60.js index 18b3b08eff..654371c09d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-60.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-60.js @@ -30,8 +30,9 @@ Object.defineProperties(obj, { }); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-61.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-61.js index d6b97792f2..7bca98d769 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-61.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-61.js @@ -22,12 +22,12 @@ Object.defineProperties(obj, { enumerable: false } }); -verifyEqualTo(obj, "foo", 10); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 10, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-62.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-62.js index 66707f734d..5e8478764f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-62.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-62.js @@ -23,12 +23,12 @@ Object.defineProperties(obj, { enumerable: true } }); -verifyEqualTo(obj, "foo", 10); -verifyNotWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 10, + writable: false, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-63.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-63.js index d6bfa302ff..c88d34a3d9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-63.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-63.js @@ -23,12 +23,12 @@ Object.defineProperties(obj, { configurable: false } }); -verifyEqualTo(obj, "foo", 10); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 10, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-64.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-64.js index fe97b64dd8..a2666ea4d3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-64.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-64.js @@ -22,12 +22,12 @@ Object.defineProperties(obj, { configurable: false } }); -verifyEqualTo(obj, "foo", 10); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 10, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-65.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-65.js index c6678316fc..47811b7582 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-65.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-65.js @@ -25,18 +25,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", 10); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: 10, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-66-1.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-66-1.js index dd97034520..ddabfa6957 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-66-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-66-1.js @@ -27,18 +27,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", 10); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: 10, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-66.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-66.js index 6c1a70521e..7bbc90ac6e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-66.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-66.js @@ -27,18 +27,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", 10); - - verifyNotWritable(obj, "foo"); - - verifyEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: 10, + writable: false, + enumerable: true, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-67.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-67.js index 3980343982..3967859349 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-67.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-67.js @@ -31,11 +31,13 @@ try { throw new Test262Error("Expected TypeError"); } catch (e) { assert(e instanceof TypeError); - verifyNotEnumerable(obj, "foo"); assert.sameValue(obj.foo, 10); - verifyNotConfigurable(obj, "foo"); + verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, + }); var desc = Object.getOwnPropertyDescriptor(obj, "foo"); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-68.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-68.js index c2581e46bf..db5ed622cd 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-68.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-68.js @@ -30,18 +30,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", 10); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: 10, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-69.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-69.js index 16f5527999..d94a669dd0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-69.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-69.js @@ -6,6 +6,7 @@ es5id: 15.2.3.7-6-a-69 description: > Object.defineProperties - 'P' is data property and P.configurable is true, desc is accessor property (8.12.9 step 9.b.i) +includes: [propertyHelper.js] ---*/ var obj = {}; @@ -25,25 +26,15 @@ Object.defineProperties(obj, { } }); -var verifyEnumerable = false; -for (var p in obj) { - if (p === "foo") { - verifyEnumerable = true; - } -} - -var verifyValue = false; -verifyValue = (obj.foo === 20); +assert.sameValue(obj.foo, 20); var desc = Object.getOwnPropertyDescriptor(obj, "foo"); -var verifyConfigurable = true; -delete obj.foo; -verifyConfigurable = obj.hasOwnProperty("foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: true, +}); -assert.sameValue(verifyConfigurable, false, 'verifyConfigurable'); -assert.sameValue(verifyEnumerable, false, 'verifyEnumerable'); -assert(verifyValue, 'verifyValue !== true'); assert.sameValue(typeof desc.set, "undefined", 'typeof desc.set'); assert.sameValue(desc.get, get_Func, 'desc.get'); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-70.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-70.js index 2c19545d04..311d85dc1e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-70.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-70.js @@ -27,12 +27,12 @@ Object.defineProperties(obj, { value: 12 } }); -verifyEqualTo(obj, "foo", 12); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 12, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-71.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-71.js index 6be29229ee..85d1d8192e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-71.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-71.js @@ -27,18 +27,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", 10); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: 10, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-72.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-72.js index 3807bf9155..8db43b2aa2 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-72.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-72.js @@ -28,18 +28,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", 10); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: 10, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-73.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-73.js index ec98b17976..4027fc5b41 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-73.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-73.js @@ -24,12 +24,12 @@ Object.defineProperties(obj, { value: undefined } }); -verifyEqualTo(obj, "foo", undefined); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-74.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-74.js index 7efeaf287a..8bbcdbb240 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-74.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-74.js @@ -24,12 +24,12 @@ Object.defineProperties(obj, { value: null } }); -verifyEqualTo(obj, "foo", null); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: null, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-75.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-75.js index a1fe2653ec..b734bd9f6f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-75.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-75.js @@ -26,8 +26,10 @@ Object.defineProperties(obj, { } }); -verifyNotEnumerable(obj, "foo"); -verifyNotWritable(obj, "foo"); -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-76.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-76.js index 1a1c1e02c0..6b6cddb15b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-76.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-76.js @@ -27,18 +27,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", -0); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: -0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-77.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-77.js index 4be63a9fc3..f444cbee00 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-77.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-77.js @@ -27,18 +27,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", +0); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: +0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-78.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-78.js index 2752971e2e..fce755d9ea 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-78.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-78.js @@ -24,12 +24,12 @@ Object.defineProperties(obj, { value: 100 } }); -verifyEqualTo(obj, "foo", 100); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 100, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-79.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-79.js index a6533a918c..b0cddcd66f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-79.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-79.js @@ -27,18 +27,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", 10); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: 10, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-80.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-80.js index a7b91fa17b..bf1780dd56 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-80.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-80.js @@ -24,12 +24,12 @@ Object.defineProperties(obj, { value: "abcd" } }); -verifyEqualTo(obj, "foo", "abcd"); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: "abcd", + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-81.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-81.js index a8b094a8e0..edc253f300 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-81.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-81.js @@ -27,18 +27,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", "abcd"); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: "abcd", + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-82.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-82.js index e5d26c4acd..3d8b01d752 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-82.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-82.js @@ -25,12 +25,12 @@ Object.defineProperties(obj, { value: false } }); -verifyEqualTo(obj, "foo", false); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: false, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-83.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-83.js index 7e69ae863b..28625eebf8 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-83.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-83.js @@ -27,18 +27,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", false); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: false, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-84-1.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-84-1.js index 19c54b3883..b4f1985956 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-84-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-84-1.js @@ -32,12 +32,12 @@ Object.defineProperties(obj, { value: obj2 } }); -verifyEqualTo(obj, "foo", obj1); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: obj1, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-84.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-84.js index 0edfc761a9..873bfc248a 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-84.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-84.js @@ -29,12 +29,12 @@ Object.defineProperties(obj, { value: obj1 } }); -verifyEqualTo(obj, "foo", obj1); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: obj1, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-85.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-85.js index f9b41a56a4..10e7399cf1 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-85.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-85.js @@ -35,18 +35,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", obj1); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: obj1, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-86-1.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-86-1.js index 500986c18d..7b10abcdc2 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-86-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-86-1.js @@ -34,16 +34,16 @@ try { } }); } catch (e) { - verifyWritable(obj, "foo", "setVerifyHelpProp"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyWritable(obj, "foo", "setVerifyHelpProp"); + +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-86.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-86.js index a6f109dabd..b1ebcbc4dd 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-86.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-86.js @@ -29,8 +29,10 @@ Object.defineProperties(obj, { }); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); -verifyNotConfigurable(obj, "foo"); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-87.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-87.js index f1cee12ac7..b4e642bcdc 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-87.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-87.js @@ -32,16 +32,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyWritable(obj, "foo", "setVerifyHelpProp"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyWritable(obj, "foo", "setVerifyHelpProp"); + +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-88.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-88.js index 12de5bbe14..5534a858b6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-88.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-88.js @@ -34,20 +34,20 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - - if (typeof(desc.set) !== "undefined") { - throw new Test262Error('Expected typeof (desc.set) === "undefined", actually ' + typeof(desc.set)); - } - - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } +} + +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); + +var desc = Object.getOwnPropertyDescriptor(obj, "foo"); +if (typeof(desc.set) !== "undefined") { + throw new Test262Error('Expected typeof (desc.set) === "undefined", actually ' + typeof(desc.set)); } reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-89.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-89.js index ae7c1d6aa4..f8cf6dc904 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-89.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-89.js @@ -30,9 +30,10 @@ Object.defineProperties(obj, { } }); -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); var desc = Object.getOwnPropertyDescriptor(obj, "foo"); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-90.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-90.js index 4a7b37c5b0..a6c7d008c1 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-90.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-90.js @@ -37,8 +37,9 @@ verifyEqualTo(obj, "foo", get_func()); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-91.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-91.js index 77f1b0a61c..94a43927be 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-91.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-91.js @@ -44,14 +44,14 @@ try { verifyWritable(obj, "foo", "setVerifyHelpProp"); - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-92.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-92.js index 8a79bf19b1..f17c0e9826 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-92.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-92.js @@ -38,14 +38,14 @@ try { } catch (e) { verifyWritable(obj, "foo", "setVerifyHelpProp"); - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-1.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-1.js index 14f8f294c5..702cfc7abd 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-1.js @@ -38,25 +38,23 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "property", 1002); - - verifyNotWritable(obj, "property"); - - verifyNotEnumerable(obj, "property"); - - verifyConfigurable(obj, "property"); - verifyEqualTo(obj, "property1", 1003); - - verifyNotWritable(obj, "property1"); - - verifyNotEnumerable(obj, "property1"); - - verifyNotConfigurable(obj, "property1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "property", { + value: 1002, + writable: false, + enumerable: false, + configurable: true, +}); + +verifyProperty(obj, "property1", { + value: 1003, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-2.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-2.js index 3426413f72..c3651d96a6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-2.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-2.js @@ -38,25 +38,23 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "0", 1002); - - verifyNotWritable(obj, "0"); - - verifyNotEnumerable(obj, "0"); - - verifyConfigurable(obj, "0"); - verifyEqualTo(obj, "1", 1003); - - verifyNotWritable(obj, "1"); - - verifyNotEnumerable(obj, "1"); - - verifyNotConfigurable(obj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "0", { + value: 1002, + writable: false, + enumerable: false, + configurable: true, +}); + +verifyProperty(obj, "1", { + value: 1003, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-3.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-3.js index 927d25a004..9ae84e271d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-3.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-3.js @@ -37,26 +37,23 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "property", 1001); - - verifyNotWritable(obj, "property"); - - verifyNotEnumerable(obj, "property"); - - verifyNotConfigurable(obj, "property"); - - verifyEqualTo(obj, "property1", 1003); - - verifyNotWritable(obj, "property1"); - - verifyNotEnumerable(obj, "property1"); - - verifyConfigurable(obj, "property1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "property", { + value: 1001, + writable: false, + enumerable: false, + configurable: false, +}); + +verifyProperty(obj, "property1", { + value: 1003, + writable: false, + enumerable: false, + configurable: true, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-4.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-4.js index 7d6548ea1d..53ff196de0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-4.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93-4.js @@ -37,25 +37,23 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "0", 1001); - - verifyNotWritable(obj, "0"); - - verifyNotEnumerable(obj, "0"); - - verifyNotConfigurable(obj, "0"); - verifyEqualTo(obj, "1", 1003); - - verifyNotWritable(obj, "1"); - - verifyNotEnumerable(obj, "1"); - - verifyConfigurable(obj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "0", { + value: 1001, + writable: false, + enumerable: false, + configurable: false, +}); + +verifyProperty(obj, "1", { + value: 1003, + writable: false, + enumerable: false, + configurable: true, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93.js index cbfc06a190..3c53e641cc 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-93.js @@ -31,8 +31,9 @@ Object.defineProperties(obj, { }); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-94.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-94.js index 8f97c40e12..7eeef1842b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-94.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-94.js @@ -19,12 +19,12 @@ Object.defineProperties(obj, { value: 200 } }); -verifyEqualTo(obj, "foo", 200); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 200, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-95.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-95.js index b89ec12636..fed250c3a3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-95.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-95.js @@ -24,12 +24,12 @@ Object.defineProperties(obj, { value: undefined } }); -verifyEqualTo(obj, "foo", undefined); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-96.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-96.js index cecec30eb2..06d55a0c5f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-96.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-96.js @@ -24,12 +24,12 @@ Object.defineProperties(obj, { value: 200 } }); -verifyEqualTo(obj, "foo", 200); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 200, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-97.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-97.js index 830402f265..23461d6227 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-97.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-97.js @@ -24,12 +24,12 @@ Object.defineProperties(obj, { writable: true } }); -verifyEqualTo(obj, "foo", 100); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 100, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-98.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-98.js index c45c0b3582..938e2a7b17 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-98.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-98.js @@ -24,12 +24,12 @@ Object.defineProperties(obj, { enumerable: true } }); -verifyEqualTo(obj, "foo", 200); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 200, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-99.js b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-99.js index 8dee2771e6..a91c0ab91f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-99.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-99.js @@ -24,12 +24,12 @@ Object.defineProperties(obj, { configurable: false } }); -verifyEqualTo(obj, "foo", 200); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 200, + writable: true, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/name.js b/js/src/tests/test262/built-ins/Object/defineProperties/name.js index 64e4c0c4c2..2a9d5c9fbe 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/name.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.defineProperties.name, "defineProperties"); - -verifyNotEnumerable(Object.defineProperties, "name"); -verifyNotWritable(Object.defineProperties, "name"); -verifyConfigurable(Object.defineProperties, "name"); +verifyProperty(Object.defineProperties, "name", { + value: "defineProperties", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperties/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/defineProperties/not-a-constructor.js index 7987b575ff..151dd2d509 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperties/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/defineProperties/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.defineProperties({}, {}); -}, '`new Object.defineProperties({}, {})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-100.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-100.js index de37bdae68..0f9b56f06d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-100.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-100.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { configurable: null }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-102.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-102.js index a0abf592c3..9352cdf328 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-102.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-102.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { configurable: false }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-103.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-103.js index c9b59463af..e25a7ab12b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-103.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-103.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { configurable: 0 }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-104.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-104.js index 9ae7f58e48..ac87f08e86 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-104.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-104.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { configurable: +0 }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-105.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-105.js index 3055a6ff9f..ccff0ebded 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-105.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-105.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { configurable: -0 }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-106.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-106.js index c6a037f9a6..5c024dd411 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-106.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-106.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { configurable: NaN }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-109.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-109.js index 575c4c9459..f433030ddf 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-109.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-109.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { configurable: "" }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-152.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-152.js index 87913b2d2d..61d481e7e8 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-152.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-152.js @@ -17,8 +17,9 @@ var attr = { Object.defineProperty(obj, "property", attr); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-153.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-153.js index 20c3e5c191..9f2c747347 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-153.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-153.js @@ -17,7 +17,8 @@ var attr = { Object.defineProperty(obj, "property", attr); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-162.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-162.js index 088bb9d5d2..79882c4f16 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-162.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-162.js @@ -18,7 +18,8 @@ Object.defineProperty(attr, "writable", { Object.defineProperty(obj, "property", attr); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-163.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-163.js index bfd2ff3dfb..80b482d4f3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-163.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-163.js @@ -29,7 +29,8 @@ Object.defineProperty(child, "writable", { Object.defineProperty(obj, "property", child); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-164.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-164.js index 61fe9a5583..2f270d9b9d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-164.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-164.js @@ -24,7 +24,8 @@ var child = new ConstructFun(); Object.defineProperty(obj, "property", child); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-171-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-171-1.js index d8ee8da884..feffeefe59 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-171-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-171-1.js @@ -17,8 +17,10 @@ try { var dateObj = new Date(); Object.defineProperty(obj, "property", dateObj); - verifyWritable(obj, "property"); + verifyProperty(obj, "property", { + writable: true, + }); } finally { delete Date.prototype.writable; } diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-178.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-178.js index 42ab36b422..9069d503ad 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-178.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-178.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { writable: undefined }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-179.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-179.js index be0fca785e..c4082a47cc 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-179.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-179.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { writable: null }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-181.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-181.js index 04a60062e3..1f47b6b09e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-181.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-181.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { writable: false }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-182.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-182.js index e1506931c8..b38cc2d799 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-182.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-182.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { writable: 0 }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-183.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-183.js index 08b46c555a..762d8861bd 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-183.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-183.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { writable: +0 }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-184.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-184.js index d456fbeb38..dca54d121b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-184.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-184.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { writable: -0 }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-185.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-185.js index 81061f91f0..d51323620d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-185.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-185.js @@ -15,10 +15,9 @@ Object.defineProperty(obj, "property", { writable: NaN }); -assert(obj.hasOwnProperty("property")); - -verifyNotWritable(obj, "property"); - -assert.sameValue(typeof(obj.property), "undefined"); +verifyProperty(obj, "property", { + value: undefined, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-188.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-188.js index 29e6a06d42..554b370535 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-188.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-188.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { writable: "" }); -assert(obj.hasOwnProperty("property")); -verifyNotWritable(obj, "property"); +verifyProperty(obj, "property", { + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-73.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-73.js index 965fa44537..816b74380c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-73.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-73.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { configurable: false }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-74.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-74.js index 443d61a4a7..5a2d1d8b46 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-74.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-74.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { value: 100 }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-76.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-76.js index 076c86ede5..70bbe20368 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-76.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-76.js @@ -22,12 +22,9 @@ var child = new ConstructFun(); Object.defineProperty(obj, "property", child); -assert(obj.hasOwnProperty("property")); - -verifyNotConfigurable(obj, "property"); - -assert(obj.hasOwnProperty("property")); - -assert.sameValue(typeof(obj.property), "undefined"); +verifyProperty(obj, "property", { + value: undefined, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-83.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-83.js index 1ab0672165..e08a8f1e06 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-83.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-83.js @@ -18,7 +18,8 @@ Object.defineProperty(attr, "configurable", { Object.defineProperty(obj, "property", attr); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-84.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-84.js index 2361aa0708..a5be67bd6f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-84.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-84.js @@ -29,7 +29,8 @@ Object.defineProperty(child, "configurable", { Object.defineProperty(obj, "property", child); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-85.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-85.js index 0b0868625f..cab6d919d0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-85.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-85.js @@ -24,11 +24,10 @@ var child = new ConstructFun(); Object.defineProperty(obj, "property", child); -assert(obj.hasOwnProperty("property")); - -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); -assert(obj.hasOwnProperty("property")); assert.sameValue(typeof(obj.property), "undefined"); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-99.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-99.js index aabe445bef..2e46f03642 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-99.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-3-99.js @@ -15,7 +15,8 @@ Object.defineProperty(obj, "property", { configurable: undefined }); -assert(obj.hasOwnProperty("property")); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-100.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-100.js index 34c2f090cd..4e92039f13 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-100.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-100.js @@ -16,12 +16,12 @@ obj.foo = 100; // default value of attributes: writable: true, configurable: tru Object.defineProperty(obj, "foo", { value: 200 }); -verifyEqualTo(obj, "foo", 200); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 200, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-101.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-101.js index 1da7826cf5..3dc30d6ed0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-101.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-101.js @@ -16,12 +16,12 @@ obj.foo = 100; // default value of attributes: writable: true, configurable: tru Object.defineProperty(obj, "foo", { value: undefined }); -verifyEqualTo(obj, "foo", undefined); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-102.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-102.js index 33d84c9f53..06fc9a4887 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-102.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-102.js @@ -16,12 +16,12 @@ obj.foo = undefined; // default value of attributes: writable: true, configurabl Object.defineProperty(obj, "foo", { value: 100 }); -verifyEqualTo(obj, "foo", 100); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 100, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-103.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-103.js index b98b2837f7..b179185952 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-103.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-103.js @@ -20,12 +20,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { writable: true }); -verifyEqualTo(obj, "foo", undefined); -verifyWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-104.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-104.js index 28de47218b..5ec8732e23 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-104.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-104.js @@ -20,12 +20,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { enumerable: true }); -verifyEqualTo(obj, "foo", undefined); -verifyNotWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: false, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-105.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-105.js index d1c51afdd3..9da65ba390 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-105.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-105.js @@ -23,12 +23,11 @@ Object.defineProperty(obj, "foo", { configurable: false }); -verifyEqualTo(obj, "foo", 200); - -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 200, + writable: true, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-106.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-106.js index 9d726fe9c3..d4897eb29c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-106.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-106.js @@ -24,12 +24,12 @@ Object.defineProperty(obj, "foo", { writable: false, enumerable: false }); -verifyEqualTo(obj, "foo", 200); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 200, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-107.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-107.js index 949c297366..9c66006422 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-107.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-107.js @@ -38,8 +38,9 @@ verifyEqualTo(obj, "foo", getFunc2()); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-108.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-108.js index c9f5864973..58e2152dc6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-108.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-108.js @@ -34,8 +34,9 @@ Object.defineProperty(obj, "foo", { }); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-109.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-109.js index 8093ffd718..fa2d599742 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-109.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-109.js @@ -34,8 +34,9 @@ verifyEqualTo(obj, "foo", getFunc()); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-110.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-110.js index c94fbc8af0..bfbf658e9f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-110.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-110.js @@ -32,8 +32,9 @@ Object.defineProperty(obj, "foo", { }); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-112.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-112.js index 4a80f6b084..662a1cbdca 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-112.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-112.js @@ -35,8 +35,9 @@ verifyEqualTo(obj, "foo", getFunc()); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-113.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-113.js index 48e4fa7f6d..bce7c0d28e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-113.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-113.js @@ -30,8 +30,9 @@ Object.defineProperty(obj, "foo", { verifyEqualTo(obj, "foo", getFunc()); -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-114.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-114.js index a0a8bc367d..a8c2631ca3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-114.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-114.js @@ -35,8 +35,9 @@ verifyEqualTo(obj, "foo", getFunc()); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-115.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-115.js index 5481206420..6137b1d684 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-115.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-115.js @@ -42,8 +42,9 @@ verifyEqualTo(obj, "foo", getFunc2()); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-118.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-118.js index 47a6508761..4407e43422 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-118.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-118.js @@ -16,8 +16,11 @@ Object.defineProperty(arrObj, "length", {}); assert.sameValue(arrObj.length, 0); arrObj.length = 2; -assert.sameValue(arrObj.length, 2); -verifyNotEnumerable(arrObj, "length"); -verifyNotConfigurable(arrObj, "length"); + +verifyProperty(arrObj, "length", { + value: 2, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-119.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-119.js index 0c07b625e0..5f50d645dc 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-119.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-119.js @@ -21,8 +21,11 @@ Object.defineProperty(arrObj, "length", { assert.sameValue(arrObj.length, 0); arrObj.length = 2; -assert.sameValue(arrObj.length, 2); -verifyNotEnumerable(arrObj, "length"); -verifyNotConfigurable(arrObj, "length"); + +verifyProperty(arrObj, "length", { + value: 2, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-124.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-124.js index 1dce4ea87c..ba58d7b69b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-124.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-124.js @@ -16,12 +16,12 @@ var arrObj = []; Object.defineProperty(arrObj, "length", { writable: false }); -verifyEqualTo(arrObj, "length", 0); -verifyNotWritable(arrObj, "length"); - -verifyNotEnumerable(arrObj, "length"); - -verifyNotConfigurable(arrObj, "length"); +verifyProperty(arrObj, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-167.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-167.js index 8c51484bd1..a611ceaf40 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-167.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-167.js @@ -22,7 +22,10 @@ Object.defineProperty(arrObj, "length", { }); assert(!arrObj.hasOwnProperty("1")) -assert.sameValue(arrObj.length, 1); -verifyNotWritable(arrObj, "length"); + +verifyProperty(arrObj, "length", { + value: 1, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-181.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-181.js index 26f0e3e3cd..9b8881341b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-181.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-181.js @@ -21,9 +21,11 @@ Object.defineProperty(arrObj, "length", { writable: false }); -verifyNotWritable(arrObj, "length"); - assert(!arrObj.hasOwnProperty("1")); -assert.sameValue(arrObj.length, 0); + +verifyProperty(arrObj, "length", { + value: 0, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-190.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-190.js index e9f7f17e6a..06d0f71da5 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-190.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-190.js @@ -24,17 +24,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "0", "ownDataProperty"); - - verifyNotWritable(arrObj, "0"); - - verifyNotEnumerable(arrObj, "0"); - - verifyNotConfigurable(arrObj, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } } +verifyProperty(arrObj, "0", { + value: "ownDataProperty", + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-194.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-194.js index c69f78bdbc..f1172f8810 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-194.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-194.js @@ -29,14 +29,14 @@ try { } catch (e) { verifyEqualTo(arrObj, "0", getFunc()); - verifyNotEnumerable(arrObj, "0"); - - verifyNotConfigurable(arrObj, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e.name); } - } +verifyProperty(arrObj, "0", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-195.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-195.js index 56e50846b6..ff0dd05fa3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-195.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-195.js @@ -41,9 +41,10 @@ try { verifyWritable(arrObj, "0", "helpVerifySet"); - verifyNotEnumerable(arrObj, "0"); - - verifyNotConfigurable(arrObj, "0"); + verifyProperty(arrObj, "0", { + enumerable: false, + configurable: false, + }); } finally { delete Array.prototype[0]; } diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-199.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-199.js index 98cefd1ded..80cbce9a39 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-199.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-199.js @@ -17,12 +17,11 @@ Object.defineProperty(arrObj, "0", { enumerable: true }); -verifyEqualTo(arrObj, "0", undefined); - -verifyNotWritable(arrObj, "0"); - -verifyEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: undefined, + writable: false, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-200.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-200.js index 2c0632c716..b727dfd394 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-200.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-200.js @@ -20,12 +20,11 @@ Object.defineProperty(arrObj, "0", { configurable: false }); -verifyEqualTo(arrObj, "0", undefined); - -verifyWritable(arrObj, "0"); - -verifyEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: undefined, + writable: true, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-201.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-201.js index ab771a71c0..67e5615699 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-201.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-201.js @@ -19,12 +19,12 @@ Object.defineProperty(arrObj, "0", { enumerable: true, configurable: false }); -verifyEqualTo(arrObj, "0", 1001); -verifyNotWritable(arrObj, "0"); - -verifyEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: 1001, + writable: false, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-202.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-202.js index f6fe819199..bb074efafc 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-202.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-202.js @@ -19,12 +19,12 @@ Object.defineProperty(arrObj, "0", { writable: true, configurable: true }); -verifyEqualTo(arrObj, "0", 1001); -verifyWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: 1001, + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-203.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-203.js index 9e6cad35fb..49840159a2 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-203.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-203.js @@ -19,12 +19,12 @@ Object.defineProperty(arrObj, "0", { writable: true, enumerable: true }); -verifyEqualTo(arrObj, "0", 1001); -verifyWritable(arrObj, "0"); - -verifyEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: 1001, + writable: true, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-204.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-204.js index b513a1dbb9..49c684f429 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-204.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-204.js @@ -19,12 +19,11 @@ Object.defineProperty(arrObj, "0", { configurable: false }); -verifyEqualTo(arrObj, "0", 1001); - -verifyNotWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: 1001, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-205.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-205.js index 72e179ef74..13a6128fa3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-205.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-205.js @@ -24,8 +24,9 @@ Object.defineProperty(arrObj, "0", { verifyWritable(arrObj, "0", "setVerifyHelpProp"); -verifyEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-207.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-207.js index 966b1744bd..72501910fb 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-207.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-207.js @@ -28,8 +28,9 @@ verifyEqualTo(arrObj, "0", getFunc()); verifyWritable(arrObj, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-208.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-208.js index ba15c84b8e..be88bcd111 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-208.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-208.js @@ -27,8 +27,9 @@ verifyEqualTo(arrObj, "0", getFunc()); verifyWritable(arrObj, "0", "setVerifyHelpProp"); -verifyEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-209.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-209.js index cdefdc539e..6a6284615f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-209.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-209.js @@ -38,8 +38,9 @@ verifyEqualTo(arrObj, "0", getFunc()); verifyWritable(arrObj, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-210.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-210.js index 3d5614db18..d94a0e32c2 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-210.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-210.js @@ -15,12 +15,12 @@ var arrObj = []; arrObj[0] = 101; // default value of attributes: writable: true, configurable: true, enumerable: true Object.defineProperty(arrObj, "0", {}); -verifyEqualTo(arrObj, "0", 101); -verifyWritable(arrObj, "0"); - -verifyEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: 101, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-211.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-211.js index 74773a8b8c..963370db23 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-211.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-211.js @@ -32,8 +32,9 @@ verifyEqualTo(arrObj, "0", getFunc()); verifyWritable(arrObj, "0", "setVerifyHelpProp"); -verifyEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-212.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-212.js index 60a73af96b..ac275e4b75 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-212.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-212.js @@ -22,12 +22,11 @@ Object.defineProperty(arrObj, "0", { configurable: true }); -verifyEqualTo(arrObj, "0", 100); - -verifyWritable(arrObj, "0"); - -verifyEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: 100, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-213.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-213.js index aba7e1fb85..9af3a4f98e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-213.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-213.js @@ -39,8 +39,9 @@ verifyEqualTo(arrObj, "0", getFunc()); verifyWritable(arrObj, "0", "setVerifyHelpProp"); -verifyEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-214.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-214.js index a68119a095..95c97dc221 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-214.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-214.js @@ -26,18 +26,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "0", 101); - - verifyNotWritable(arrObj, "0"); - - verifyNotEnumerable(arrObj, "0"); - - verifyNotConfigurable(arrObj, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "0", { + value: 101, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-215.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-215.js index f6fccd3a61..84af6b3d29 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-215.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-215.js @@ -19,12 +19,12 @@ Object.defineProperty(arrObj, "0", { Object.defineProperty(arrObj, "0", { value: undefined }); -verifyEqualTo(arrObj, "0", undefined); -verifyNotWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-216.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-216.js index ac7099d2bd..fd58d43e5c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-216.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-216.js @@ -19,12 +19,12 @@ Object.defineProperty(arrObj, "0", { Object.defineProperty(arrObj, "0", { value: null }); -verifyEqualTo(arrObj, "0", null); -verifyNotWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: null, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-217.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-217.js index 3b9df95a20..b539dc5c9d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-217.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-217.js @@ -20,11 +20,11 @@ Object.defineProperty(arrObj, "0", { value: NaN }); -assert(arrObj.hasOwnProperty("0")); -assert(arrObj[0] !== arrObj[0]); - -verifyNotWritable(arrObj, "0"); -verifyNotEnumerable(arrObj, "0"); -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: NaN, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-218.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-218.js index f9e2e8c567..4f1697f07b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-218.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-218.js @@ -23,18 +23,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "0", -0); - - verifyNotWritable(arrObj, "0"); - - verifyNotEnumerable(arrObj, "0"); - - verifyNotConfigurable(arrObj, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "0", { + value: -0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-219.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-219.js index 627a70f3ac..ef0742dce5 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-219.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-219.js @@ -23,18 +23,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "0", +0); - - verifyNotWritable(arrObj, "0"); - - verifyNotEnumerable(arrObj, "0"); - - verifyNotConfigurable(arrObj, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "0", { + value: +0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-220.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-220.js index 1e3d4a2d4c..a890330b36 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-220.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-220.js @@ -20,12 +20,12 @@ Object.defineProperty(arrObj, "0", { Object.defineProperty(arrObj, "0", { value: 101 }); -verifyEqualTo(arrObj, "0", 101); -verifyNotWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: 101, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-221.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-221.js index 00732ff7be..441feff1b9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-221.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-221.js @@ -25,18 +25,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "0", 101); - - verifyNotWritable(arrObj, "0"); - - verifyNotEnumerable(arrObj, "0"); - - verifyNotConfigurable(arrObj, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "0", { + value: 101, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-222.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-222.js index 88d73c0af9..93d15fbf4f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-222.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-222.js @@ -20,12 +20,12 @@ Object.defineProperty(arrObj, "0", { Object.defineProperty(arrObj, "0", { value: "abcd" }); -verifyEqualTo(arrObj, "0", "abcd"); -verifyNotWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: "abcd", + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-223.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-223.js index 7177f6a39a..b39670d94c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-223.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-223.js @@ -25,18 +25,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "0", "abcd"); - - verifyNotWritable(arrObj, "0"); - - verifyNotEnumerable(arrObj, "0"); - - verifyNotConfigurable(arrObj, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "0", { + value: "abcd", + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-224.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-224.js index 91cac8ffdc..01c57e38f7 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-224.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-224.js @@ -20,12 +20,12 @@ Object.defineProperty(arrObj, "0", { Object.defineProperty(arrObj, "0", { value: true }); -verifyEqualTo(arrObj, "0", true); -verifyNotWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: true, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-225.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-225.js index 28d8f74f8e..29b344eb75 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-225.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-225.js @@ -25,18 +25,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "0", true); - - verifyNotWritable(arrObj, "0"); - - verifyNotEnumerable(arrObj, "0"); - - verifyNotConfigurable(arrObj, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "0", { + value: true, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-226.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-226.js index d766b26449..1b02ed6bbb 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-226.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-226.js @@ -24,12 +24,13 @@ Object.defineProperty(arrObj, "0", { Object.defineProperty(arrObj, "0", { value: obj1 }); -verifyEqualTo(arrObj, "0", obj1); -verifyNotWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: obj1, + writable: false, + enumerable: false, + configurable: false, +}); -verifyNotConfigurable(arrObj, "0"); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-227.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-227.js index 1834373563..a01f415dac 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-227.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-227.js @@ -32,18 +32,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "0", obj1); - - verifyNotWritable(arrObj, "0"); - - verifyNotEnumerable(arrObj, "0"); - - verifyNotConfigurable(arrObj, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "0", { + value: obj1, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-228.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-228.js index 9316e59db2..c6a7bea532 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-228.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-228.js @@ -20,12 +20,12 @@ Object.defineProperty(arrObj, "0", { Object.defineProperty(arrObj, "0", { writable: false }); -verifyEqualTo(arrObj, "0", undefined); -verifyNotWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-229.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-229.js index e1dead5a60..7dc8b36836 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-229.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-229.js @@ -21,12 +21,12 @@ Object.defineProperty(arrObj, "0", { Object.defineProperty(arrObj, "0", { writable: true }); -verifyEqualTo(arrObj, "0", undefined); -verifyWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: undefined, + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-230.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-230.js index 61d0187d81..44305782dc 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-230.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-230.js @@ -34,8 +34,9 @@ verifyEqualTo(arrObj, "0", getFunc()); verifyWritable(arrObj, "0", "helpVerifySet"); -verifyNotEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-231.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-231.js index 40199bd209..9180a48ff8 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-231.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-231.js @@ -40,8 +40,9 @@ verifyEqualTo(arrObj, "0", getFunc2()); verifyWritable(arrObj, "0", "helpVerifySet"); -verifyNotEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-232.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-232.js index d22adbe6f1..b61f732589 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-232.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-232.js @@ -26,8 +26,9 @@ Object.defineProperty(arrObj, "0", { }); verifyWritable(arrObj, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-233.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-233.js index bd2f68977e..137485c1eb 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-233.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-233.js @@ -29,8 +29,9 @@ Object.defineProperty(arrObj, "0", { }); verifyWritable(arrObj, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-234.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-234.js index b67690ecd5..056b76e72c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-234.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-234.js @@ -20,12 +20,12 @@ Object.defineProperty(arrObj, "0", { Object.defineProperty(arrObj, "0", { enumerable: false }); -verifyEqualTo(arrObj, "0", undefined); -verifyNotWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-235.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-235.js index d10baaf8d4..6d46f6e47f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-235.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-235.js @@ -21,12 +21,12 @@ Object.defineProperty(arrObj, "0", { Object.defineProperty(arrObj, "0", { enumerable: true }); -verifyEqualTo(arrObj, "0", undefined); -verifyNotWritable(arrObj, "0"); - -verifyEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: undefined, + writable: false, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-236.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-236.js index b7df65b72a..d403262794 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-236.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-236.js @@ -20,12 +20,12 @@ Object.defineProperty(arrObj, "0", { Object.defineProperty(arrObj, "0", { configurable: false }); -verifyEqualTo(arrObj, "0", undefined); -verifyNotWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-237.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-237.js index 59d2e8c84e..291c075755 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-237.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-237.js @@ -20,12 +20,12 @@ Object.defineProperty(arrObj, "0", { Object.defineProperty(arrObj, "0", { configurable: false }); -verifyEqualTo(arrObj, "0", undefined); -verifyNotWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-238.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-238.js index 9708bd0766..2afbac121c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-238.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-238.js @@ -27,20 +27,17 @@ try { configurable: true }); throw new Test262Error("Expected an exception."); - } catch (e) { - verifyEqualTo(arrObj, "1", 3); - - verifyWritable(arrObj, "1"); - - verifyNotEnumerable(arrObj, "1"); - - verifyNotConfigurable(arrObj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "1", { + value: 3, + writable: true, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-239.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-239.js index 16a8aa0b1a..3036c00095 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-239.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-239.js @@ -29,20 +29,17 @@ try { enumerable: true }); throw new Test262Error("Expected an exception."); - } catch (e) { - verifyEqualTo(arrObj, "1", 3); - - verifyWritable(arrObj, "1"); - - verifyNotEnumerable(arrObj, "1"); - - verifyNotConfigurable(arrObj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "1", { + value: 3, + writable: true, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-240.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-240.js index e74b2479d3..7c3712b1e3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-240.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-240.js @@ -32,14 +32,14 @@ try { } catch (e) { verifyWritable(arrObj, "1", "setVerifyHelpProp"); - verifyNotEnumerable(arrObj, "1"); - - verifyNotConfigurable(arrObj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "1", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-241.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-241.js index 8923abc966..6447fcad04 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-241.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-241.js @@ -24,20 +24,17 @@ try { set: function() {} }); throw new Test262Error("Expected an exception."); - } catch (e) { - verifyEqualTo(arrObj, "1", 3); - - verifyNotWritable(arrObj, "1"); - - verifyNotEnumerable(arrObj, "1"); - - verifyNotConfigurable(arrObj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "1", { + value: 3, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-242-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-242-1.js index 7c21f48ca5..b943a2a765 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-242-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-242-1.js @@ -20,12 +20,11 @@ Object.defineProperty(arrObj, "0", { enumerable: false }); -verifyEqualTo(arrObj, "0", 1001); - -verifyNotWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: 1001, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-242.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-242.js index 5f1d4a8dce..29b55c9ba9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-242.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-242.js @@ -24,8 +24,9 @@ Object.defineProperty(arrObj, "0", { verifyWritable(arrObj, "0", "setVerifyHelpProp"); -verifyEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-243-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-243-1.js index a87d6172ea..672f5cc677 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-243-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-243-1.js @@ -27,8 +27,9 @@ arrObj[1] = 4; verifyEqualTo(arrObj, "1", getFunc()); -verifyNotEnumerable(arrObj, "1"); - -verifyConfigurable(arrObj, "1"); +verifyProperty(arrObj, "1", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-243-2-strict.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-243-2-strict.js index ef5649662c..6ac6382e7d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-243-2-strict.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-243-2-strict.js @@ -29,8 +29,9 @@ assert.throws(TypeError, function() { }); verifyEqualTo(arrObj, "1", getFunc()); -verifyNotEnumerable(arrObj, "1"); - -verifyConfigurable(arrObj, "1"); +verifyProperty(arrObj, "1", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-243.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-243.js index 08a11f8705..c6be9ba3ec 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-243.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-243.js @@ -27,12 +27,11 @@ Object.defineProperty(arrObj, "1", { value: 12 }); -verifyEqualTo(arrObj, "1", 12); - -verifyNotWritable(arrObj, "1"); - -verifyNotEnumerable(arrObj, "1"); - -verifyConfigurable(arrObj, "1"); +verifyProperty(arrObj, "1", { + value: 12, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-244.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-244.js index e5e1d30c7b..112dc0cbfd 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-244.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-244.js @@ -22,25 +22,21 @@ Object.defineProperty(arrObj, "1", { }); try { - Object.defineProperty(arrObj, "1", { writable: true }); throw new Test262Error("Expected an exception."); - } catch (e) { - verifyEqualTo(arrObj, "1", undefined); - - verifyNotWritable(arrObj, "1"); - - verifyNotEnumerable(arrObj, "1"); - - verifyNotConfigurable(arrObj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "1", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-245.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-245.js index eae22cfee2..91c5b07da6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-245.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-245.js @@ -29,18 +29,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "1", 3); - - verifyNotWritable(arrObj, "1"); - - verifyNotEnumerable(arrObj, "1"); - - verifyNotConfigurable(arrObj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "1", { + value: 3, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-246.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-246.js index dddbc50767..863f1a7c71 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-246.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-246.js @@ -18,7 +18,6 @@ var arrObj = []; Object.defineProperty(arrObj, "1", { value: -0 - }); try { @@ -27,18 +26,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "1", -0); - - verifyNotWritable(arrObj, "1"); - - verifyNotEnumerable(arrObj, "1"); - - verifyNotConfigurable(arrObj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "1", { + value: -0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-247.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-247.js index 1a3085a231..fb296bd6b0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-247.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-247.js @@ -27,18 +27,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "1", +0); - - verifyNotWritable(arrObj, "1"); - - verifyNotEnumerable(arrObj, "1"); - - verifyNotConfigurable(arrObj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "1", { + value: +0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-248.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-248.js index b946c44ae1..8bcd5768f8 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-248.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-248.js @@ -26,18 +26,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "1", 12); - - verifyNotWritable(arrObj, "1"); - - verifyNotEnumerable(arrObj, "1"); - - verifyNotConfigurable(arrObj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "1", { + value: 12, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-249.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-249.js index 9a7132c20f..7753d29ba7 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-249.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-249.js @@ -26,18 +26,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "1", "abc"); - - verifyNotWritable(arrObj, "1"); - - verifyNotEnumerable(arrObj, "1"); - - verifyNotConfigurable(arrObj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "1", { + value: "abc", + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-250.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-250.js index e4710d7ef8..5475d629db 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-250.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-250.js @@ -26,18 +26,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "1", false); - - verifyNotWritable(arrObj, "1"); - - verifyNotEnumerable(arrObj, "1"); - - verifyNotConfigurable(arrObj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "1", { + value: false, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-251.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-251.js index 594cb3a3ee..90796842bc 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-251.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-251.js @@ -29,18 +29,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "1", obj); - - verifyNotWritable(arrObj, "1"); - - verifyNotEnumerable(arrObj, "1"); - - verifyNotConfigurable(arrObj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "1", { + value: obj, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-252.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-252.js index ab56258dc1..a3ac4bf1ef 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-252.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-252.js @@ -32,14 +32,14 @@ try { } catch (e) { verifyWritable(arrObj, "1", "setVerifyHelpProp"); - verifyNotEnumerable(arrObj, "1"); - - verifyNotConfigurable(arrObj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "1", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-253.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-253.js index a6fbb2221c..90c76748ad 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-253.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-253.js @@ -32,14 +32,14 @@ try { } catch (e) { verifyEqualTo(arrObj, "1", getFunc()); - verifyNotEnumerable(arrObj, "1"); - - verifyNotConfigurable(arrObj, "1"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "1", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-254.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-254.js index 857f5bd3e1..3960688abb 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-254.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-254.js @@ -29,7 +29,9 @@ var desc = Object.getOwnPropertyDescriptor(arrObj, "1"); assert(desc.hasOwnProperty("get") && typeof desc.get === "undefined"); assert(desc.hasOwnProperty("set") && typeof desc.set === "undefined"); -verifyNotEnumerable(arrObj, "1"); -verifyNotConfigurable(arrObj, "1"); +verifyProperty(arrObj, "1", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-255.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-255.js index 03e3d8a268..d4ec618a12 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-255.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-255.js @@ -40,9 +40,11 @@ try { assert(arrObj[1] === getFunc()); assert(desc.hasOwnProperty("set") && typeof desc.set === "undefined"); - - verifyNotEnumerable(arrObj, "1"); - verifyNotConfigurable(arrObj, "1"); } +verifyProperty(arrObj, "1", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-256.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-256.js index a015f2a9a0..20fb18a60a 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-256.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-256.js @@ -38,8 +38,10 @@ try { assert(desc.hasOwnProperty("set") && typeof desc.set === "undefined"); verifyNotWritable(arrObj, "1"); - - verifyNotConfigurable(arrObj, "1"); } +verifyProperty(arrObj, "1", { + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-257.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-257.js index e6e8c2d369..96f9aae122 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-257.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-257.js @@ -31,8 +31,9 @@ Object.defineProperty(arrObj, "1", { verifyWritable(arrObj, "1", "setVerifyHelpProp"); -verifyNotEnumerable(arrObj, "1"); - -verifyNotConfigurable(arrObj, "1"); +verifyProperty(arrObj, "1", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-258.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-258.js index 9821d646bb..c1fe51cf10 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-258.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-258.js @@ -17,12 +17,12 @@ var arrObj = [100]; Object.defineProperty(arrObj, "0", { value: 200 }); -verifyEqualTo(arrObj, "0", 200); -verifyWritable(arrObj, "0"); - -verifyEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: 200, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-259.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-259.js index b0fbd5e780..e7fbdc8f17 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-259.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-259.js @@ -17,12 +17,12 @@ var arrObj = [100]; Object.defineProperty(arrObj, "0", { value: undefined }); -verifyEqualTo(arrObj, "0", undefined); -verifyWritable(arrObj, "0"); - -verifyEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: undefined, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-260.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-260.js index 5e2b69c160..3a195ba846 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-260.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-260.js @@ -16,12 +16,12 @@ var arrObj = [undefined]; Object.defineProperty(arrObj, "0", { value: 100 }); -verifyEqualTo(arrObj, "0", 100); -verifyWritable(arrObj, "0"); - -verifyEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: 100, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-261.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-261.js index e945f54eeb..7ecc70fc44 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-261.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-261.js @@ -16,12 +16,12 @@ var arrObj = [100]; Object.defineProperty(arrObj, "0", { writable: false }); -verifyEqualTo(arrObj, "0", 100); -verifyNotWritable(arrObj, "0"); - -verifyEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: 100, + writable: false, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-262.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-262.js index aed61cb5ae..b9a6475463 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-262.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-262.js @@ -17,12 +17,12 @@ var arrObj = [100]; Object.defineProperty(arrObj, "0", { enumerable: false }); -verifyEqualTo(arrObj, "0", 100); -verifyWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: 100, + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-263.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-263.js index b0b4ea2cc0..c0caa9fd90 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-263.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-263.js @@ -17,12 +17,12 @@ var arrObj = [100]; Object.defineProperty(arrObj, "0", { configurable: false }); -verifyEqualTo(arrObj, "0", 100); -verifyWritable(arrObj, "0"); - -verifyEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: 100, + writable: true, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-264.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-264.js index a7d2eac7f2..97db5f6f91 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-264.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-264.js @@ -18,12 +18,12 @@ Object.defineProperty(arrObj, "0", { enumerable: false, configurable: false }); -verifyEqualTo(arrObj, "0", 100); -verifyNotWritable(arrObj, "0"); - -verifyNotEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + value: 100, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-265.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-265.js index f68fdd93f4..ae3d86596c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-265.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-265.js @@ -28,8 +28,9 @@ Object.defineProperty(arrObj, "0", { }); verifyEqualTo(arrObj, "0", getFunc()); -verifyNotEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-266.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-266.js index 98d664d424..7fd1bfcf7f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-266.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-266.js @@ -26,8 +26,10 @@ Object.defineProperty(arrObj, "0", { Object.defineProperty(arrObj, "0", { get: undefined }); -verifyNotEnumerable(arrObj, "0"); -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-267.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-267.js index b1d1f3c19e..532c94c676 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-267.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-267.js @@ -27,8 +27,9 @@ Object.defineProperty(arrObj, "0", { }); verifyEqualTo(arrObj, "0", getFunc()); -verifyNotEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-268.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-268.js index 8f65ec43a1..3f60a9de36 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-268.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-268.js @@ -27,8 +27,9 @@ Object.defineProperty(arrObj, "0", { }); verifyWritable(arrObj, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-269.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-269.js index 84be2830ff..9f0535aa58 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-269.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-269.js @@ -22,8 +22,10 @@ Object.defineProperty(arrObj, "0", { Object.defineProperty(arrObj, "0", { set: undefined }); -verifyNotEnumerable(arrObj, "0"); -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-270.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-270.js index 696ebb956a..5d22407b0b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-270.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-270.js @@ -28,8 +28,9 @@ Object.defineProperty(arrObj, "0", { }); verifyWritable(arrObj, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-271.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-271.js index e82084fe9e..f79b212fcf 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-271.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-271.js @@ -29,8 +29,9 @@ Object.defineProperty(arrObj, "0", { }); verifyWritable(arrObj, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arrObj, "0"); - -verifyConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-272.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-272.js index 663614560e..478981ccd2 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-272.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-272.js @@ -28,8 +28,9 @@ Object.defineProperty(arrObj, "0", { }); verifyWritable(arrObj, "0", "setVerifyHelpProp"); -verifyNotEnumerable(arrObj, "0"); - -verifyNotConfigurable(arrObj, "0"); +verifyProperty(arrObj, "0", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-273.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-273.js index 14d45dbbb5..0855f67372 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-273.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-273.js @@ -39,8 +39,9 @@ verifyEqualTo(arrObj, "1", getFunc()); verifyWritable(arrObj, "1", "setVerifyHelpProp"); -verifyNotEnumerable(arrObj, "1"); - -verifyNotConfigurable(arrObj, "1"); +verifyProperty(arrObj, "1", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-277.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-277.js index 825c594a6b..919c7ebc51 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-277.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-277.js @@ -21,12 +21,11 @@ Object.defineProperty(arrObj, "property", { configurable: true }); -verifyEqualTo(arrObj, "property", 12); - -verifyWritable(arrObj, "property"); - -verifyEnumerable(arrObj, "property"); - -verifyConfigurable(arrObj, "property"); +verifyProperty(arrObj, "property", { + value: 12, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-278.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-278.js index 4ad70e2558..bf537c408d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-278.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-278.js @@ -32,8 +32,9 @@ verifyEqualTo(arrObj, "property", getFunc()); verifyWritable(arrObj, "property", "setVerifyHelpProp"); -verifyEnumerable(arrObj, "property"); - -verifyConfigurable(arrObj, "property"); +verifyProperty(arrObj, "property", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-279.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-279.js index 9f78e7cc67..6536ef9bdc 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-279.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-279.js @@ -38,8 +38,9 @@ verifyEqualTo(arrObj, "property", getFunc()); verifyWritable(arrObj, "property", "setVerifyHelpProp"); -verifyNotEnumerable(arrObj, "property"); - -verifyNotConfigurable(arrObj, "property"); +verifyProperty(arrObj, "property", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-280.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-280.js index 7315c8c784..63f0d7d140 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-280.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-280.js @@ -21,12 +21,11 @@ Object.defineProperty(arrObj, "property", { configurable: false }); -verifyEqualTo(arrObj, "property", 12); - -verifyNotWritable(arrObj, "property"); - -verifyNotEnumerable(arrObj, "property"); - -verifyNotConfigurable(arrObj, "property"); +verifyProperty(arrObj, "property", { + value: 12, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-281.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-281.js index 67ec5776bc..36b8dc51e3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-281.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-281.js @@ -23,18 +23,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "property", 12); - - verifyNotWritable(arrObj, "property"); - - verifyNotEnumerable(arrObj, "property"); - - verifyNotConfigurable(arrObj, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "property", { + value: 12, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-282.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-282.js index 0b05899bc6..01f4174e22 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-282.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-282.js @@ -23,18 +23,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "property", undefined); - - verifyNotWritable(arrObj, "property"); - - verifyNotEnumerable(arrObj, "property"); - - verifyNotConfigurable(arrObj, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "property", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-283.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-283.js index 7ca939b4f5..c106eef000 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-283.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-283.js @@ -23,18 +23,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "property", 12); - - verifyNotWritable(arrObj, "property"); - - verifyNotEnumerable(arrObj, "property"); - - verifyNotConfigurable(arrObj, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "property", { + value: 12, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-284.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-284.js index 48bd118b9c..ef9e68ce98 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-284.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-284.js @@ -23,18 +23,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arrObj, "property", 12); - - verifyNotWritable(arrObj, "property"); - - verifyNotEnumerable(arrObj, "property"); - - verifyNotConfigurable(arrObj, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "property", { + value: 12, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-285.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-285.js index 055d7d32d7..5604a04a61 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-285.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-285.js @@ -37,14 +37,14 @@ try { verifyWritable(arrObj, "property", "setVerifyHelpProp"); - verifyNotEnumerable(arrObj, "property"); - - verifyNotConfigurable(arrObj, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "property", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-286.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-286.js index ebf54b5e61..7c2317d15f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-286.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-286.js @@ -28,14 +28,14 @@ try { } catch (e) { verifyWritable(arrObj, "property", "setVerifyHelpProp"); - verifyNotEnumerable(arrObj, "property"); - - verifyNotConfigurable(arrObj, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "property", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-287.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-287.js index 3aa609e301..28ce64b648 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-287.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-287.js @@ -29,14 +29,14 @@ try { } catch (e) { verifyWritable(arrObj, "property", "setVerifyHelpProp"); - verifyNotEnumerable(arrObj, "property"); - - verifyNotConfigurable(arrObj, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "property", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-288.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-288.js index 99317bcbab..a022fc284d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-288.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-288.js @@ -29,14 +29,14 @@ try { } catch (e) { verifyWritable(arrObj, "property", "setVerifyHelpProp"); - verifyNotEnumerable(arrObj, "property"); - - verifyNotConfigurable(arrObj, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(arrObj, "property", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-289-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-289-1.js index 9c16dbb07a..83ecff8e49 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-289-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-289-1.js @@ -28,13 +28,12 @@ includes: [propertyHelper.js] throw new Test262Error("Expected a === 0, actually " + a); } - verifyEqualTo(arguments, "0", 10); - - verifyWritable(arguments, "0"); - - verifyEnumerable(arguments, "0"); - - verifyConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + value: 10, + writable: true, + enumerable: true, + configurable: true, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-289.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-289.js index 4b90e38ef6..c5f4bc699a 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-289.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-289.js @@ -19,13 +19,13 @@ includes: [propertyHelper.js] enumerable: true, configurable: true }); - verifyEqualTo(arguments, "0", 10); - verifyWritable(arguments, "0"); - - verifyEnumerable(arguments, "0"); - - verifyConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + value: 10, + writable: true, + enumerable: true, + configurable: true, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-290-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-290-1.js index 71fa4baeff..b31957da09 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-290-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-290-1.js @@ -37,9 +37,10 @@ includes: [propertyHelper.js] verifyWritable(arguments, "0", "setVerifyHelpProp"); - verifyEnumerable(arguments, "0"); - - verifyConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + enumerable: true, + configurable: true, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-290.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-290.js index 6b4d350268..204d9550c6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-290.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-290.js @@ -31,9 +31,10 @@ includes: [propertyHelper.js] verifyWritable(arguments, "0", "setVerifyHelpProp"); - verifyEnumerable(arguments, "0"); - - verifyConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + enumerable: true, + configurable: true, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-291-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-291-1.js index 04faea4a9e..98cac6c8b0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-291-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-291-1.js @@ -36,9 +36,10 @@ includes: [propertyHelper.js] verifyEqualTo(arguments, "0", getFunc2()); - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-291.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-291.js index 0d936a72a3..d7b113d7d4 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-291.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-291.js @@ -31,9 +31,10 @@ includes: [propertyHelper.js] }); verifyEqualTo(arguments, "0", getFunc2()); - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-292-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-292-1.js index 124143b87c..8eb28bae83 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-292-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-292-1.js @@ -25,13 +25,12 @@ flags: [noStrict] throw new Test262Error('Expected a === 20, actually ' + a); } - verifyEqualTo(arguments, "0", 20); - - verifyNotWritable(arguments, "0"); - - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + value: 20, + writable: false, + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-292-2-strict.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-292-2-strict.js index 5327e61f5d..da294bea67 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-292-2-strict.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-292-2-strict.js @@ -26,13 +26,12 @@ flags: [onlyStrict] throw new Test262Error('Expected a === 0, actually ' + a); } - verifyEqualTo(arguments, "0", 20); - - verifyNotWritable(arguments, "0"); - - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + value: 20, + writable: false, + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-292.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-292.js index 7091d42cf8..b96b3476f4 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-292.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-292.js @@ -18,13 +18,13 @@ includes: [propertyHelper.js] enumerable: false, configurable: false }); - verifyEqualTo(arguments, "0", 20); - verifyNotWritable(arguments, "0"); - - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + value: 20, + writable: false, + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-1.js index 642e95f413..f4d493bade 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-1.js @@ -20,13 +20,13 @@ includes: [propertyHelper.js] Object.defineProperty(arguments, "0", { value: 20 }); - verifyEqualTo(arguments, "0", 20); - verifyNotWritable(arguments, "0"); - - verifyEnumerable(arguments, "0"); - - verifyConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + value: 20, + writable: false, + enumerable: true, + configurable: true, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-2.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-2.js index 063ab121d1..9ed17e4bb3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-2.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-2.js @@ -28,24 +28,21 @@ flags: [noStrict] throw new Test262Error("Expected an exception."); } catch (e) { - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - verifyEqualTo(arguments, "0", 10); - - verifyNotWritable(arguments, "0"); - - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (a !== 10) { throw new Test262Error('Expected "a === 10", actually ' + a); } - } + + verifyProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-3.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-3.js index a27f584a65..bb3170d229 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-3.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-3.js @@ -26,13 +26,12 @@ flags: [noStrict] throw new Test262Error('Expected "a === 10", actually ' + a); } - verifyEqualTo(arguments, "0", 20); - - verifyNotWritable(arguments, "0"); - - verifyEnumerable(arguments, "0"); - - verifyConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + value: 20, + writable: false, + enumerable: true, + configurable: true, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-4-strict.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-4-strict.js index 03ace78694..6e6c2d9eda 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-4-strict.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293-4-strict.js @@ -27,13 +27,12 @@ flags: [onlyStrict] throw new Test262Error('Expected "a === 0", actually ' + a); } - verifyEqualTo(arguments, "0", 20); - - verifyNotWritable(arguments, "0"); - - verifyEnumerable(arguments, "0"); - - verifyConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + value: 20, + writable: false, + enumerable: true, + configurable: true, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293.js index 4ca208ba8e..002556ebbe 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-293.js @@ -25,19 +25,17 @@ includes: [propertyHelper.js] }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arguments, "0", 10); - - verifyNotWritable(arguments, "0"); - - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-294-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-294-1.js index e358ab75e8..38413c6b14 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-294-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-294-1.js @@ -32,20 +32,17 @@ flags: [noStrict] throw new Test262Error("Expected TypeError, got " + e); } - verifyEqualTo(arguments, "0", 10); - - verifyNotWritable(arguments, "0"); - - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (a !== 10) { throw new Test262Error('Expected "a === 10", actually ' + a); } - } + verifyProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-294.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-294.js index 08c69e755e..5138dc4c3f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-294.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-294.js @@ -24,19 +24,17 @@ includes: [propertyHelper.js] }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arguments, "0", 10); - - verifyNotWritable(arguments, "0"); - - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-295-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-295-1.js index 394066dfc2..3045dee339 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-295-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-295-1.js @@ -32,18 +32,17 @@ flags: [noStrict] throw new Test262Error("Expected TypeError, got " + e); } - verifyEqualTo(arguments, "0", 10); - - verifyNotWritable(arguments, "0"); - - verifyEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (a !== 10) { throw new Test262Error('Expected "a === 10", actually ' + a); } } + + verifyProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: true, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-295.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-295.js index cd7eb340b7..34df8eb700 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-295.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-295.js @@ -24,19 +24,17 @@ includes: [propertyHelper.js] }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arguments, "0", 10); - - verifyNotWritable(arguments, "0"); - - verifyEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: true, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-296-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-296-1.js index 77e9fe1642..90a53ae720 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-296-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-296-1.js @@ -31,18 +31,17 @@ flags: [noStrict] throw new Test262Error("Expected TypeError, got " + e); } - verifyEqualTo(arguments, "0", 10); - - verifyNotWritable(arguments, "0"); - - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (a !== 10) { throw new Test262Error('Expected "a === 10", actually ' + a); } } + + verifyProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-296.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-296.js index 8625821007..af40ff4d9c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-296.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-296.js @@ -24,19 +24,17 @@ includes: [propertyHelper.js] }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arguments, "0", 10); - - verifyNotWritable(arguments, "0"); - - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-297-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-297-1.js index 8627560fa9..ec2b3857da 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-297-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-297-1.js @@ -38,15 +38,15 @@ includes: [propertyHelper.js] verifyEqualTo(arguments, "0", getFunc1()); - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-297.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-297.js index e738fc84a3..fee2b5a6d6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-297.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-297.js @@ -32,15 +32,15 @@ includes: [propertyHelper.js] } catch (e) { verifyEqualTo(arguments, "0", getFunc1()); - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-298-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-298-1.js index 9cb976b0fd..3bf5f45f96 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-298-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-298-1.js @@ -39,15 +39,15 @@ includes: [propertyHelper.js] verifyEqualTo(arguments, "0", getFunc()); - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-298.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-298.js index 651330f8f5..e0f0627691 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-298.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-298.js @@ -33,15 +33,15 @@ includes: [propertyHelper.js] } catch (e) { verifyEqualTo(arguments, "0", getFunc()); - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-299-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-299-1.js index 2ef3e98416..f56db5b666 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-299-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-299-1.js @@ -33,15 +33,15 @@ includes: [propertyHelper.js] } verifyEqualTo(arguments, "0", getFunc()); - verifyEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + enumerable: true, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-299.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-299.js index 8294112d3a..533e491194 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-299.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-299.js @@ -28,15 +28,15 @@ includes: [propertyHelper.js] } catch (e) { verifyEqualTo(arguments, "0", getFunc()); - verifyEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + enumerable: true, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-300-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-300-1.js index 802dd24613..b3d77c7423 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-300-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-300-1.js @@ -33,15 +33,15 @@ includes: [propertyHelper.js] } verifyEqualTo(arguments, "0", getFunc()); - verifyEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + enumerable: true, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-300.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-300.js index 2341d87dca..6e14aa45a6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-300.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-300.js @@ -28,15 +28,15 @@ includes: [propertyHelper.js] } catch (e) { verifyEqualTo(arguments, "0", getFunc()); - verifyEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + enumerable: true, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-301-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-301-1.js index 50854b502f..ba3ff3691c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-301-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-301-1.js @@ -23,13 +23,13 @@ includes: [propertyHelper.js] if (a !== 0) { throw new Test262Error("Expected a === 0, actually " + a); } - verifyEqualTo(arguments, "0", 10); - verifyNotWritable(arguments, "0"); - - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-301.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-301.js index 6387b45b3c..0f32d2e7bc 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-301.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-301.js @@ -20,13 +20,13 @@ includes: [propertyHelper.js] enumerable: false, configurable: false }); - verifyEqualTo(arguments, "0", 10); - verifyNotWritable(arguments, "0"); - - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + value: 10, + writable: false, + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-302-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-302-1.js index d9e24450e1..2ccfa7b7b0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-302-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-302-1.js @@ -36,9 +36,10 @@ includes: [propertyHelper.js] verifyWritable(arguments, "0", "setVerifyHelpProp"); - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-302.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-302.js index 40fe4d4fcd..a3818170b8 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-302.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-302.js @@ -32,9 +32,10 @@ includes: [propertyHelper.js] verifyWritable(arguments, "0", "setVerifyHelpProp"); - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + enumerable: false, + configurable: false, + }); }(0, 1, 2)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-303.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-303.js index e1d15a9dcd..b627552c2b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-303.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-303.js @@ -32,9 +32,10 @@ includes: [propertyHelper.js] }); verifyEqualTo(arguments, "0", getFunc2()); - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + enumerable: false, + configurable: false, + }); }()); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-304.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-304.js index 058949b82b..a327b5b422 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-304.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-304.js @@ -19,13 +19,13 @@ includes: [propertyHelper.js] enumerable: false, configurable: false }); - verifyEqualTo(arguments, "0", 20); - verifyNotWritable(arguments, "0"); - - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); + verifyProperty(arguments, "0", { + value: 20, + writable: false, + enumerable: false, + configurable: false, + }); }()); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-305.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-305.js index 88e3ea9526..fedd5c087c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-305.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-305.js @@ -25,19 +25,17 @@ includes: [propertyHelper.js] }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arguments, "0", 0); - - verifyNotWritable(arguments, "0"); - - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + value: 0, + writable: false, + enumerable: false, + configurable: false, + }); }()); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-306.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-306.js index a33eff559b..54208f8013 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-306.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-306.js @@ -25,19 +25,17 @@ includes: [propertyHelper.js] }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arguments, "0", 0); - - verifyNotWritable(arguments, "0"); - - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + value: 0, + writable: false, + enumerable: false, + configurable: false, + }); }()); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-307.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-307.js index c9fdf870ff..df233b482d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-307.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-307.js @@ -25,19 +25,17 @@ includes: [propertyHelper.js] }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arguments, "0", 0); - - verifyNotWritable(arguments, "0"); - - verifyEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + value: 0, + writable: false, + enumerable: true, + configurable: false, + }); }()); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-308.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-308.js index aceabc53a0..e9cff62621 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-308.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-308.js @@ -25,19 +25,17 @@ includes: [propertyHelper.js] }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arguments, "0", 0); - - verifyNotWritable(arguments, "0"); - - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + value: 0, + writable: false, + enumerable: false, + configurable: false, + }); }()); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-309.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-309.js index f1803f13cd..36adce5824 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-309.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-309.js @@ -33,15 +33,15 @@ includes: [propertyHelper.js] } catch (e) { verifyEqualTo(arguments, "0", getFunc1()); - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + enumerable: false, + configurable: false, + }); }()); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-310.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-310.js index 094229861a..462d472756 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-310.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-310.js @@ -34,15 +34,15 @@ includes: [propertyHelper.js] } catch (e) { verifyEqualTo(arguments, "0", getFunc()); - verifyNotEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + enumerable: false, + configurable: false, + }); }()); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-311.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-311.js index ede81f7918..9a4c8172be 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-311.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-311.js @@ -29,15 +29,15 @@ includes: [propertyHelper.js] } catch (e) { verifyEqualTo(arguments, "0", getFunc()); - verifyEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + enumerable: true, + configurable: false, + }); }()); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-312.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-312.js index eaf2c27fab..b906d92976 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-312.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-312.js @@ -27,15 +27,15 @@ includes: [propertyHelper.js] } catch (e) { verifyEqualTo(arguments, "0", getFunc()); - verifyEnumerable(arguments, "0"); - - verifyNotConfigurable(arguments, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "0", { + enumerable: true, + configurable: false, + }); }()); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-313-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-313-1.js index 24f6b77d8b..f51e471fec 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-313-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-313-1.js @@ -18,13 +18,13 @@ includes: [propertyHelper.js] enumerable: true, configurable: true }); - verifyEqualTo(arguments, "genericProperty", 1001); - verifyWritable(arguments, "genericProperty"); - - verifyEnumerable(arguments, "genericProperty"); - - verifyConfigurable(arguments, "genericProperty"); + verifyProperty(arguments, "genericProperty", { + value: 1001, + writable: true, + enumerable: true, + configurable: true, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-313.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-313.js index 5f5650d942..815ad29d11 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-313.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-313.js @@ -18,13 +18,13 @@ includes: [propertyHelper.js] enumerable: true, configurable: true }); - verifyEqualTo(arguments, "genericProperty", 1001); - verifyWritable(arguments, "genericProperty"); - - verifyEnumerable(arguments, "genericProperty"); - - verifyConfigurable(arguments, "genericProperty"); + verifyProperty(arguments, "genericProperty", { + value: 1001, + writable: true, + enumerable: true, + configurable: true, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-314-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-314-1.js index aaa4d6a0fc..60c2f1066f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-314-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-314-1.js @@ -29,9 +29,10 @@ includes: [propertyHelper.js] verifyWritable(arguments, "genericProperty", "testgetFunction"); - verifyEnumerable(arguments, "genericProperty"); - - verifyConfigurable(arguments, "genericProperty"); + verifyProperty(arguments, "genericProperty", { + enumerable: true, + configurable: true, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-314.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-314.js index 707689d404..de44b05071 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-314.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-314.js @@ -29,9 +29,10 @@ includes: [propertyHelper.js] verifyWritable(arguments, "genericProperty", "testgetFunction"); - verifyEnumerable(arguments, "genericProperty"); - - verifyConfigurable(arguments, "genericProperty"); + verifyProperty(arguments, "genericProperty", { + enumerable: true, + configurable: true, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-315-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-315-1.js index 078b2b0c03..83290dddd1 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-315-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-315-1.js @@ -44,9 +44,10 @@ includes: [propertyHelper.js] verifyWritable(arguments, "genericProperty", "testgetFunction"); - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); + verifyProperty(arguments, "genericProperty", { + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-315.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-315.js index f9e6b876a8..7d6c5b80c8 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-315.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-315.js @@ -40,9 +40,10 @@ includes: [propertyHelper.js] verifyWritable(arguments, "genericProperty", "testgetFunction"); - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); + verifyProperty(arguments, "genericProperty", { + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-316-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-316-1.js index 4c18c0b45c..9d4203c2b7 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-316-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-316-1.js @@ -23,13 +23,13 @@ includes: [propertyHelper.js] enumerable: false, configurable: false }); - verifyEqualTo(arguments, "genericProperty", 1002); - verifyWritable(arguments, "genericProperty"); - - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); + verifyProperty(arguments, "genericProperty", { + value: 1002, + writable: true, + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-316.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-316.js index 6683891473..7ed325b7ab 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-316.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-316.js @@ -23,13 +23,13 @@ includes: [propertyHelper.js] enumerable: false, configurable: false }); - verifyEqualTo(arguments, "genericProperty", 1002); - verifyWritable(arguments, "genericProperty"); - - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); + verifyProperty(arguments, "genericProperty", { + value: 1002, + writable: true, + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-317-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-317-1.js index be820cbce1..5eec5035ee 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-317-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-317-1.js @@ -28,19 +28,17 @@ includes: [propertyHelper.js] throw new Test262Error('Expected "b === 2;", actually ' + b); } - verifyEqualTo(arguments, "genericProperty", 1001); - - verifyNotWritable(arguments, "genericProperty"); - - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "genericProperty", { + value: 1001, + writable: false, + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-317.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-317.js index 77ca0ba862..0d7c8266b0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-317.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-317.js @@ -23,19 +23,17 @@ includes: [propertyHelper.js] }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arguments, "genericProperty", 1001); - - verifyNotWritable(arguments, "genericProperty"); - - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "genericProperty", { + value: 1001, + writable: false, + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-318-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-318-1.js index c275772feb..acd8d37483 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-318-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-318-1.js @@ -23,19 +23,17 @@ includes: [propertyHelper.js] }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arguments, "genericProperty", undefined); - - verifyNotWritable(arguments, "genericProperty"); - - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "genericProperty", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-318.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-318.js index 95284091f6..ce31e7dc9f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-318.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-318.js @@ -22,21 +22,17 @@ includes: [propertyHelper.js] }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arguments, "genericProperty", undefined); - - verifyNotWritable(arguments, "genericProperty"); - - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + verifyProperty(arguments, "genericProperty", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-319-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-319-1.js index 6f184f8196..449fdf3fbd 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-319-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-319-1.js @@ -23,20 +23,17 @@ includes: [propertyHelper.js] }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arguments, "genericProperty", undefined); - - verifyNotWritable(arguments, "genericProperty"); - - verifyEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "genericProperty", { + value: undefined, + writable: false, + enumerable: true, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-319.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-319.js index d4c4c20dc9..a9059f043f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-319.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-319.js @@ -22,19 +22,17 @@ includes: [propertyHelper.js] }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arguments, "genericProperty", undefined); - - verifyNotWritable(arguments, "genericProperty"); - - verifyEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "genericProperty", { + value: undefined, + writable: false, + enumerable: true, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-320-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-320-1.js index 794b689a98..343a81b5eb 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-320-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-320-1.js @@ -22,19 +22,17 @@ includes: [propertyHelper.js] }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arguments, "genericProperty", undefined); - - verifyNotWritable(arguments, "genericProperty"); - - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "genericProperty", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-320.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-320.js index 2d16488d20..018b12ae85 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-320.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-320.js @@ -21,21 +21,17 @@ includes: [propertyHelper.js] }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(arguments, "genericProperty", undefined); - - verifyNotWritable(arguments, "genericProperty"); - - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + verifyProperty(arguments, "genericProperty", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-321-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-321-1.js index f0b19aff91..328f00ac56 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-321-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-321-1.js @@ -41,15 +41,15 @@ includes: [propertyHelper.js] verifyWritable(arguments, "genericProperty", "helpVerifyGet"); - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "genericProperty", { + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-321.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-321.js index ce1ebc65ec..cc21c38b96 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-321.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-321.js @@ -36,15 +36,15 @@ includes: [propertyHelper.js] verifyWritable(arguments, "genericProperty", "helpVerifyGet"); - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "genericProperty", { + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-322-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-322-1.js index 4261b4980b..e50a02d336 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-322-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-322-1.js @@ -30,15 +30,15 @@ includes: [propertyHelper.js] } catch (e) { verifyWritable(arguments, "genericProperty", "genericPropertyString"); - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "genericProperty", { + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-322.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-322.js index 9414c90d54..3d52c42a3d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-322.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-322.js @@ -29,15 +29,15 @@ includes: [propertyHelper.js] } catch (e) { verifyWritable(arguments, "genericProperty", "genericPropertyString"); - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "genericProperty", { + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-323-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-323-1.js index 769c0a8634..252fad78ae 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-323-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-323-1.js @@ -32,16 +32,15 @@ includes: [propertyHelper.js] } verifyWritable(arguments, "genericProperty", "genericPropertyString"); - verifyEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + verifyProperty(arguments, "genericProperty", { + enumerable: true, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-323.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-323.js index a6e17705ef..ee0cbf67ac 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-323.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-323.js @@ -28,15 +28,15 @@ includes: [propertyHelper.js] } catch (e) { verifyWritable(arguments, "genericProperty", "genericPropertyString"); - verifyEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "genericProperty", { + enumerable: true, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-324-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-324-1.js index 949102ee2f..0bffa63c65 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-324-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-324-1.js @@ -28,15 +28,15 @@ includes: [propertyHelper.js] } catch (e) { verifyWritable(arguments, "genericProperty", "genericPropertyString"); - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } + + verifyProperty(arguments, "genericProperty", { + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-324.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-324.js index bd7e47b2d2..c7f0a023f6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-324.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-324.js @@ -27,16 +27,15 @@ includes: [propertyHelper.js] } catch (e) { verifyWritable(arguments, "genericProperty", "genericPropertyString"); - verifyNotEnumerable(arguments, "genericProperty"); - - verifyNotConfigurable(arguments, "genericProperty"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } - false; + + verifyProperty(arguments, "genericProperty", { + enumerable: false, + configurable: false, + }); }(1, 2, 3)); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-1.js index b38f669f07..b1eb009f19 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-1.js @@ -24,12 +24,11 @@ Object.defineProperty(obj, "property", { value: 1002 }); -verifyEqualTo(obj, "property", 1002); - -verifyWritable(obj, "property"); - -verifyNotEnumerable(obj, "property"); - -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + value: 1002, + writable: true, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-2.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-2.js index 2c7ac9fd07..e2df9640ff 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-2.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-2.js @@ -24,12 +24,11 @@ Object.defineProperty(obj, "0", { value: 1002 }); -verifyEqualTo(obj, "0", 1002); - -verifyWritable(obj, "0"); - -verifyNotEnumerable(obj, "0"); - -verifyNotConfigurable(obj, "0"); +verifyProperty(obj, "0", { + value: 1002, + writable: true, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-3.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-3.js index 214436cb50..cd9db364ea 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-3.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-3.js @@ -26,12 +26,11 @@ Object.defineProperty(obj, "property", { value: 1002 }); -verifyEqualTo(obj, "property", 1002); - -verifyWritable(obj, "property"); - -verifyNotEnumerable(obj, "property"); - -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + value: 1002, + writable: true, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-6.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-6.js index 21265866ff..77186e1b85 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-6.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-6.js @@ -24,12 +24,11 @@ Object.defineProperty(obj, "0", { value: 1002 }); -verifyEqualTo(obj, "0", 1002); - -verifyWritable(obj, "0"); - -verifyNotEnumerable(obj, "0"); - -verifyNotConfigurable(obj, "0"); +verifyProperty(obj, "0", { + value: 1002, + writable: true, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-7.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-7.js index dea755a355..8881de5da7 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-7.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-7.js @@ -24,12 +24,11 @@ Object.defineProperty(obj, "prop", { value: 1002 }); -verifyEqualTo(obj, "prop", 1002); - -verifyWritable(obj, "prop"); - -verifyNotEnumerable(obj, "prop"); - -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + value: 1002, + writable: true, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-8.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-8.js index 785d0adc99..1e440f485b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-8.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-333-8.js @@ -26,12 +26,11 @@ Object.defineProperty(obj, "0", { value: 1002 }); -verifyEqualTo(obj, "0", 1002); - -verifyWritable(obj, "0"); - -verifyNotEnumerable(obj, "0"); - -verifyNotConfigurable(obj, "0"); +verifyProperty(obj, "0", { + value: 1002, + writable: true, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-335.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-335.js index 177a249f90..8afe8c12f0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-335.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-335.js @@ -18,8 +18,9 @@ Object.defineProperty(obj, "prop", { configurable: false }); -assert(obj.hasOwnProperty("prop")); -verifyNotConfigurable(obj, "prop"); -assert.sameValue(obj.prop, 2010); +verifyProperty(obj, "prop", { + value: 2010, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-349.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-349.js index 143606c7a9..af098aa486 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-349.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-349.js @@ -18,8 +18,9 @@ Object.defineProperty(obj, "prop", { configurable: false }); -assert(obj.hasOwnProperty("prop")); -verifyNotConfigurable(obj, "prop"); -assert.sameValue(obj.prop, 2010); +verifyProperty(obj, "prop", { + value: 2010, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-1.js index 3e580abc51..f17f51615c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-1.js @@ -24,12 +24,11 @@ Object.defineProperty(obj, "property", { value: 1002 }); -verifyEqualTo(obj, "property", 1002); - -verifyNotWritable(obj, "property"); - -verifyNotEnumerable(obj, "property"); - -verifyConfigurable(obj, "property"); +verifyProperty(obj, "property", { + value: 1002, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-10.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-10.js index 4fa47d892d..78e8a4e234 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-10.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-10.js @@ -24,12 +24,11 @@ Object.defineProperty(obj, "0", { value: 1002 }); -verifyEqualTo(obj, "0", 1002); - -verifyNotWritable(obj, "0"); - -verifyNotEnumerable(obj, "0"); - -verifyConfigurable(obj, "0"); +verifyProperty(obj, "0", { + value: 1002, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-11.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-11.js index 0f23373bff..3cde36b73f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-11.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-11.js @@ -24,12 +24,11 @@ Object.defineProperty(obj, "prop", { value: 1002 }); -verifyEqualTo(obj, "prop", 1002); - -verifyNotWritable(obj, "prop"); - -verifyNotEnumerable(obj, "prop"); - -verifyConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + value: 1002, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-12.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-12.js index c301667d62..762a767ecc 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-12.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-12.js @@ -26,12 +26,11 @@ Object.defineProperty(obj, "0", { value: 1002 }); -verifyEqualTo(obj, "0", 1002); - -verifyNotWritable(obj, "0"); - -verifyNotEnumerable(obj, "0"); - -verifyConfigurable(obj, "0"); +verifyProperty(obj, "0", { + value: 1002, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-15.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-15.js index 42cf188ef5..df68d33fc5 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-15.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-15.js @@ -19,7 +19,9 @@ Object.defineProperty(obj, "prop", { configurable: true }); -assert.sameValue(obj.prop, 2010); -verifyNotWritable(obj, "prop"); +verifyProperty(obj, "prop", { + value: 2010, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-16.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-16.js index b5947a8818..94466d9dcf 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-16.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-16.js @@ -22,7 +22,9 @@ Object.defineProperty(obj, "0", { configurable: true }); -assert.sameValue(obj[0], 2010); -verifyNotWritable(obj, "0"); +verifyProperty(obj, "0", { + value: 2010, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-2.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-2.js index 60ef5a8187..25c8fd2b22 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-2.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-2.js @@ -24,12 +24,11 @@ Object.defineProperty(obj, "0", { value: 1002 }); -verifyEqualTo(obj, "0", 1002); - -verifyNotWritable(obj, "0"); - -verifyNotEnumerable(obj, "0"); - -verifyConfigurable(obj, "0"); +verifyProperty(obj, "0", { + value: 1002, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-3.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-3.js index fecfdd55a4..7567ddf16d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-3.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-3.js @@ -25,12 +25,11 @@ Object.defineProperty(obj, "property", { value: 1002 }); -verifyEqualTo(obj, "property", 1002); - -verifyNotWritable(obj, "property"); - -verifyNotEnumerable(obj, "property"); - -verifyConfigurable(obj, "property"); +verifyProperty(obj, "property", { + value: 1002, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-6.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-6.js index 140bc5b7f7..58669c9a14 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-6.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-6.js @@ -19,7 +19,9 @@ Object.defineProperty(obj, "0", { configurable: true }); -assert.sameValue(obj[0], 2010); -verifyNotWritable(obj, "0"); +verifyProperty(obj, "0", { + value: 2010, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-7.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-7.js index 31fffa2ee2..c7f38278ed 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-7.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354-7.js @@ -21,7 +21,9 @@ Object.defineProperty(obj, "prop", { configurable: true }); -assert.sameValue(obj.prop, 2010); -verifyNotWritable(obj, "prop"); +verifyProperty(obj, "prop", { + value: 2010, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354.js index dbf15887fb..d43159c7c6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-354.js @@ -18,7 +18,9 @@ Object.defineProperty(obj, "prop", { configurable: true }); -assert.sameValue(obj.prop, 2010); -verifyNotWritable(obj, "prop"); +verifyProperty(obj, "prop", { + value: 2010, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-361.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-361.js index ddaf657cd8..5369b5da0b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-361.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-361.js @@ -18,7 +18,9 @@ Object.defineProperty(obj, "prop", { configurable: false }); -assert.sameValue(obj.prop, 2010); -verifyNotWritable(obj, "prop"); +verifyProperty(obj, "prop", { + value: 2010, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-363.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-363.js index 5eb3404f36..cd9b1d6519 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-363.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-363.js @@ -18,7 +18,8 @@ Object.defineProperty(obj, "prop", { configurable: false }); -assert(obj.hasOwnProperty("prop")); -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-368.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-368.js index 1faaa98d37..1a9cb6b12b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-368.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-368.js @@ -18,7 +18,9 @@ Object.defineProperty(obj, "prop", { configurable: true }); -assert.sameValue(obj.prop, 2010); -verifyNotWritable(obj, "prop"); +verifyProperty(obj, "prop", { + value: 2010, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-375.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-375.js index b41c9513e2..9c9cbd5511 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-375.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-375.js @@ -18,7 +18,9 @@ Object.defineProperty(obj, "prop", { configurable: false }); -assert.sameValue(obj.prop, 2010); -verifyNotWritable(obj, "prop"); +verifyProperty(obj, "prop", { + value: 2010, + writable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-377.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-377.js index efd2e54659..c9102fcc6f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-377.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-377.js @@ -18,7 +18,8 @@ Object.defineProperty(obj, "prop", { configurable: false }); -assert(obj.hasOwnProperty("prop")); -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-38.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-38.js index f40b4f152a..b3ac2b6d88 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-38.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-38.js @@ -16,13 +16,12 @@ try { configurable: true }); - verifyEqualTo(Math, "foo", 12); - - verifyNotWritable(Math, "foo"); - - verifyNotEnumerable(Math, "foo"); - - verifyConfigurable(Math, "foo"); + verifyProperty(Math, "foo", { + value: 12, + writable: false, + enumerable: false, + configurable: true, + }); } finally { delete Math.foo; } diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-41.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-41.js index e69119a145..df5be6a6c9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-41.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-41.js @@ -16,13 +16,12 @@ Object.defineProperty(JSON, "foo", { configurable: true }); -verifyEqualTo(JSON, "foo", 12); - -verifyNotWritable(JSON, "foo"); - -verifyNotEnumerable(JSON, "foo"); - -verifyConfigurable(JSON, "foo"); +verifyProperty(JSON, "foo", { + value: 12, + writable: false, + enumerable: false, + configurable: true, +}); delete JSON.foo; diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-429.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-429.js index 1484ccd385..074908184e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-429.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-429.js @@ -24,11 +24,11 @@ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); Object.defineProperty(obj, "prop", { configurable: false }); -var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); -verifyNotConfigurable(obj, "prop"); assert.sameValue(desc1.configurable, true); -assert.sameValue(desc2.configurable, false); -assert(obj.hasOwnProperty("prop")); + +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-434.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-434.js index 0c278f09b7..7d3bd1adc5 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-434.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-434.js @@ -19,12 +19,8 @@ Object.defineProperty(obj, "prop", { configurable: false }); -assert(obj.hasOwnProperty("prop")); - -var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - -assert.sameValue(desc.configurable, false); - -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-438.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-438.js index ccf6b3d0aa..25bb6064b0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-438.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-438.js @@ -30,14 +30,11 @@ try { } catch (e) { assert(e instanceof TypeError); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - assert.sameValue(desc1.configurable, false); - assert.sameValue(desc2.configurable, false); - - verifyNotConfigurable(obj, "prop"); - - assert(obj.hasOwnProperty("prop")); } +verifyProperty(obj, "prop", { + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-447.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-447.js index e7580caeb2..e983a44b71 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-447.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-447.js @@ -25,12 +25,10 @@ Object.defineProperty(obj, "prop", { configurable: false }); -var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - assert.sameValue(desc1.configurable, true); -assert.sameValue(desc2.configurable, false); -verifyNotConfigurable(obj, "prop"); -assert(obj.hasOwnProperty("prop")); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-45.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-45.js index 65701f6c78..63126072c2 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-45.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-45.js @@ -15,12 +15,11 @@ Object.defineProperty(this, "foo", { configurable: true }); -verifyEqualTo(this, "foo", 12); - -verifyNotWritable(this, "foo"); - -verifyNotEnumerable(this, "foo"); - -verifyConfigurable(this, "foo"); +verifyProperty(this, "foo", { + value: 12, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-452.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-452.js index d099d78495..19a74b78ac 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-452.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-452.js @@ -19,12 +19,8 @@ Object.defineProperty(obj, "prop", { configurable: false }); -assert(obj.hasOwnProperty("prop")); - -var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - -assert.sameValue(desc.configurable, false); - -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-456.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-456.js index da9397f14d..3f008f372c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-456.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-456.js @@ -30,14 +30,11 @@ try { } catch (e) { assert(e instanceof TypeError); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - assert.sameValue(desc1.configurable, false); - assert.sameValue(desc2.configurable, false); - - verifyNotConfigurable(obj, "prop"); - - assert(obj.hasOwnProperty("prop")); } +verifyProperty(obj, "prop", { + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-465.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-465.js index 6ff40b2cc5..f4071187d6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-465.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-465.js @@ -30,12 +30,10 @@ Object.defineProperty(obj, "prop", { configurable: false }); -var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - assert.sameValue(desc1.configurable, true); -assert.sameValue(desc2.configurable, false); -verifyNotConfigurable(obj, "prop"); -assert(obj.hasOwnProperty("prop")); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-47.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-47.js index 4b8fd1bf7f..6734e898d6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-47.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-47.js @@ -18,12 +18,11 @@ Object.defineProperty(obj, "property", { configurable: false }); -verifyEqualTo(obj, "property", undefined); - -verifyWritable(obj, "property"); - -verifyEnumerable(obj, "property"); - -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + value: undefined, + writable: true, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-470.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-470.js index 39b025006b..9a8cdc0e77 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-470.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-470.js @@ -26,13 +26,10 @@ Object.defineProperty(obj, "prop", { assert(obj.hasOwnProperty("prop")); -var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - verifyNotWritable(obj, "prop"); -verifyNotConfigurable(obj, "prop"); - -assert.sameValue(desc.configurable, false); -assert(obj.hasOwnProperty("prop")); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-474.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-474.js index ce3fa250dd..6c9bdd63e7 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-474.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-474.js @@ -35,14 +35,11 @@ try { } catch (e) { assert(e instanceof TypeError); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - assert.sameValue(desc1.configurable, false); - assert.sameValue(desc2.configurable, false); - - verifyNotConfigurable(obj, "prop"); - - assert(obj.hasOwnProperty("prop")); } +verifyProperty(obj, "prop", { + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-48.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-48.js index 1dcf25ea46..68228104fc 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-48.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-48.js @@ -18,12 +18,11 @@ Object.defineProperty(obj, "property", { configurable: false }); -verifyEqualTo(obj, "property", 1001); - -verifyNotWritable(obj, "property"); - -verifyEnumerable(obj, "property"); - -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + value: 1001, + writable: false, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-483.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-483.js index 118a8aac10..44225c7497 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-483.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-483.js @@ -30,13 +30,10 @@ Object.defineProperty(obj, "prop", { configurable: false }); -var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - assert.sameValue(desc1.configurable, true); -assert.sameValue(desc2.configurable, false); - -verifyNotConfigurable(obj, "prop"); -assert(obj.hasOwnProperty("prop")); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-488.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-488.js index 0785a3996e..c6155cd8de 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-488.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-488.js @@ -24,13 +24,8 @@ Object.defineProperty(obj, "prop", { configurable: false }); -assert(obj.hasOwnProperty("prop")); - -var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - -verifyNotConfigurable(obj, "prop"); -assert.sameValue(desc.configurable, false); - -assert(obj.hasOwnProperty("prop")); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-49.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-49.js index 9e45eed271..5861ea3315 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-49.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-49.js @@ -17,12 +17,12 @@ Object.defineProperty(obj, "property", { writable: true, configurable: true }); -verifyEqualTo(obj, "property", 1001); -verifyWritable(obj, "property"); - -verifyNotEnumerable(obj, "property"); - -verifyConfigurable(obj, "property"); +verifyProperty(obj, "property", { + value: 1001, + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-492.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-492.js index cc418c9e12..08df806be9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-492.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-492.js @@ -35,14 +35,11 @@ try { } catch (e) { assert(e instanceof TypeError); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - - verifyNotConfigurable(obj, "prop"); - assert.sameValue(desc1.configurable, false); - assert.sameValue(desc2.configurable, false); - - assert(obj.hasOwnProperty("prop")); } +verifyProperty(obj, "prop", { + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-50.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-50.js index f49f61a6c3..3a3a1ae707 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-50.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-50.js @@ -17,12 +17,12 @@ Object.defineProperty(obj, "property", { writable: true, enumerable: true }); -verifyEqualTo(obj, "property", 1001); -verifyWritable(obj, "property"); - -verifyEnumerable(obj, "property"); - -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + value: 1001, + writable: true, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-501.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-501.js index 7de38b5055..436f8d63e3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-501.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-501.js @@ -29,14 +29,12 @@ Object.defineProperty(obj, "prop", { configurable: false }); -var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - assert.sameValue(desc1.configurable, true); -assert.sameValue(desc2.configurable, false); verifyNotWritable(obj, "prop"); -verifyNotConfigurable(obj, "prop"); -assert(obj.hasOwnProperty("prop")); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-506.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-506.js index 8ad6ca3b7c..a65dd9b778 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-506.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-506.js @@ -23,14 +23,8 @@ Object.defineProperty(obj, "prop", { configurable: false }); -assert(obj.hasOwnProperty("prop")); - -var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - -assert.sameValue(desc.configurable, false); - -verifyNotConfigurable(obj, "prop"); - -assert(obj.hasOwnProperty("prop")); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-51.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-51.js index 989d71d164..7c987bdbb3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-51.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-51.js @@ -20,12 +20,11 @@ Object.defineProperty(obj, "property", { configurable: false }); -verifyEqualTo(obj, "property", 1001); - -verifyNotWritable(obj, "property"); - -verifyNotEnumerable(obj, "property"); - -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + value: 1001, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-510.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-510.js index 325f76e16c..418d8113e1 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-510.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-510.js @@ -34,14 +34,11 @@ try { } catch (e) { assert(e instanceof TypeError); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - assert.sameValue(desc1.configurable, false); - assert.sameValue(desc2.configurable, false); - - verifyNotConfigurable(obj, "prop"); - - assert(obj.hasOwnProperty("prop")); } +verifyProperty(obj, "prop", { + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-519.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-519.js index 60baf731ee..b5305b02e3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-519.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-519.js @@ -29,13 +29,10 @@ Object.defineProperty(obj, "prop", { configurable: false }); -var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - assert.sameValue(desc1.configurable, true); -assert.sameValue(desc2.configurable, false); - -verifyNotConfigurable(obj, "prop"); -assert(obj.hasOwnProperty("prop")); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-52.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-52.js index 0d2ca8420a..4c2713c081 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-52.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-52.js @@ -14,12 +14,11 @@ var obj = {}; Object.defineProperty(obj, "property", {}); -verifyEqualTo(obj, "property", undefined); - -verifyNotWritable(obj, "property"); - -verifyNotEnumerable(obj, "property"); - -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-524.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-524.js index aa6fe43c25..7f2161477f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-524.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-524.js @@ -23,13 +23,8 @@ Object.defineProperty(obj, "prop", { configurable: false }); -assert(obj.hasOwnProperty("prop")); -var desc = Object.getOwnPropertyDescriptor(obj, "prop"); - -assert.sameValue(desc.configurable, false); - -verifyNotConfigurable(obj, "prop"); - -assert(obj.hasOwnProperty("prop")); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-528.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-528.js index b666822536..5dab355151 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-528.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-528.js @@ -34,14 +34,11 @@ try { } catch (e) { assert(e instanceof TypeError); - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - assert.sameValue(desc1.configurable, false); - assert.sameValue(desc2.configurable, false); - - verifyNotConfigurable(obj, "prop"); - - assert(obj.hasOwnProperty("prop")); } +verifyProperty(obj, "prop", { + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-53.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-53.js index b8dd34d5ab..2da947a546 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-53.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-53.js @@ -23,8 +23,9 @@ Object.defineProperty(obj, "property", { verifyWritable(obj, "property", "setVerifyHelpProp"); -verifyEnumerable(obj, "property"); - -verifyConfigurable(obj, "property"); +verifyProperty(obj, "property", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-1.js index 167099fb52..8326068541 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-1.js @@ -40,8 +40,9 @@ verifyEqualTo(obj, "property", getFunc()); verifyWritable(obj, "property", "verifySetFunction1"); -verifyNotEnumerable(obj, "property"); - -verifyConfigurable(obj, "property"); +verifyProperty(obj, "property", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-10.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-10.js index 50dbf751f4..a419791c35 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-10.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-10.js @@ -42,8 +42,9 @@ verifyEqualTo(obj, "0", getFunc()); verifyWritable(obj, "0", "verifySetFunction1"); -verifyNotEnumerable(obj, "0"); - -verifyConfigurable(obj, "0"); +verifyProperty(obj, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-11.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-11.js index d23dfcde09..304b9db3bb 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-11.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-11.js @@ -41,8 +41,9 @@ verifyEqualTo(obj, "prop", getFunc()); verifyWritable(obj, "prop", "verifySetFunction1"); -verifyNotEnumerable(obj, "prop"); - -verifyConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-12.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-12.js index 05a7954bab..7cac1e393e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-12.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-12.js @@ -43,8 +43,9 @@ verifyEqualTo(obj, "0", getFunc()); verifyWritable(obj, "0", "verifySetFunction1"); -verifyNotEnumerable(obj, "0"); - -verifyConfigurable(obj, "0"); +verifyProperty(obj, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-2.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-2.js index 6c459d0db2..2151ea314c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-2.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-2.js @@ -42,8 +42,9 @@ verifyEqualTo(obj, "0", getFunc()); verifyWritable(obj, "0", "verifySetFunction1"); -verifyNotEnumerable(obj, "0"); - -verifyConfigurable(obj, "0"); +verifyProperty(obj, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-3.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-3.js index 0dc6f76257..9720210f17 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-3.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-531-3.js @@ -43,8 +43,9 @@ verifyEqualTo(obj, "property", getFunc()); verifyWritable(obj, "property", "verifySetFunction1"); -verifyNotEnumerable(obj, "property"); - -verifyConfigurable(obj, "property"); +verifyProperty(obj, "property", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-537.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-537.js index e05ce8fecf..a361819a17 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-537.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-537.js @@ -34,11 +34,11 @@ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); Object.defineProperty(obj, "prop", { configurable: false }); -var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); -verifyNotConfigurable(obj, "prop"); assert.sameValue(desc1.configurable, true); -assert.sameValue(desc2.configurable, false); -assert(obj.hasOwnProperty("prop")); + +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-1.js index 06dd0aa4b9..340bbd5aa2 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-1.js @@ -54,8 +54,9 @@ verifyEqualTo(obj, "0", 1001); verifyNotWritable(obj, "0"); -verifyEnumerable(obj, "0"); - -verifyConfigurable(obj, "0"); +verifyProperty(obj, "0", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-2.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-2.js index c1a03d0ff9..89fcca4632 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-2.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-2.js @@ -56,8 +56,9 @@ verifyEqualTo(obj, "prop", 1001); verifyNotWritable(obj, "prop"); -verifyEnumerable(obj, "prop"); - -verifyConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-5.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-5.js index effdbc3676..146f5c421b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-5.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-5.js @@ -55,8 +55,9 @@ verifyEqualTo(obj, "prop", 1001); verifyNotWritable(obj, "prop"); -verifyEnumerable(obj, "prop"); - -verifyConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-6.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-6.js index 4bfe9d32ee..aa286ce903 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-6.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538-6.js @@ -56,8 +56,9 @@ verifyEqualTo(obj, "0", 1001); verifyNotWritable(obj, "0"); -verifyEnumerable(obj, "0"); - -verifyConfigurable(obj, "0"); +verifyProperty(obj, "0", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538.js index 8943f5cff9..89f7fbe3e5 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-538.js @@ -51,8 +51,9 @@ verifyEqualTo(obj, "prop", 1001); verifyNotWritable(obj, "prop"); -verifyEnumerable(obj, "prop"); - -verifyConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-54.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-54.js index 34de6eff1d..e36e1e18ac 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-54.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-54.js @@ -26,7 +26,9 @@ assert.sameValue(obj.property, "property"); var desc = Object.getOwnPropertyDescriptor(obj, "property"); assert.sameValue(typeof desc.set, "undefined"); -verifyNotEnumerable(obj, "property"); -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-1.js index ac2f8d5fb0..b7ccfef31f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-1.js @@ -38,12 +38,13 @@ try { verifyEqualTo(obj, "property", getFunc()); verifyWritable(obj, "property", "verifySetFunction"); - - verifyNotEnumerable(obj, "property"); - - verifyNotConfigurable(obj, "property"); } +verifyProperty(obj, "property", { + enumerable: false, + configurable: false, +}); + try { Object.defineProperty(obj, "property", { set: function(value) { @@ -59,14 +60,14 @@ try { verifyWritable(obj, "property", "verifySetFunction"); - verifyNotEnumerable(obj, "property"); - - verifyNotConfigurable(obj, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "property", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-2.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-2.js index df61180433..4e2ac6db59 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-2.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-2.js @@ -38,12 +38,13 @@ try { verifyEqualTo(obj, "0", getFunc()); verifyWritable(obj, "0", "verifySetFunction"); - - verifyNotEnumerable(obj, "0"); - - verifyNotConfigurable(obj, "0"); } +verifyProperty(obj, "0", { + enumerable: false, + configurable: false, +}); + try { Object.defineProperty(obj, "0", { set: function(value) { @@ -59,14 +60,14 @@ try { verifyWritable(obj, "0", "verifySetFunction"); - verifyNotEnumerable(obj, "0"); - - verifyNotConfigurable(obj, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "0", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-3.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-3.js index f7018700c9..1aeb2c071d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-3.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-3.js @@ -39,12 +39,13 @@ try { verifyEqualTo(obj, "property", getFunc()); verifyWritable(obj, "property", "verifySetFunction"); - - verifyNotEnumerable(obj, "property"); - - verifyNotConfigurable(obj, "property"); } +verifyProperty(obj, "property", { + enumerable: false, + configurable: false, +}); + try { Object.defineProperty(obj, "property", { set: function(value) { @@ -61,14 +62,14 @@ try { verifyWritable(obj, "property", "verifySetFunction"); - verifyNotEnumerable(obj, "property"); - - verifyNotConfigurable(obj, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "property", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-6.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-6.js index 64cc3ff55f..8431a64191 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-6.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-6.js @@ -39,12 +39,13 @@ try { verifyEqualTo(obj, "0", getFunc()); verifyWritable(obj, "0", "verifySetFunction"); - - verifyNotEnumerable(obj, "0"); - - verifyNotConfigurable(obj, "0"); } +verifyProperty(obj, "0", { + enumerable: false, + configurable: false, +}); + try { Object.defineProperty(obj, "0", { set: function(value) { @@ -60,15 +61,14 @@ try { verifyWritable(obj, "0", "verifySetFunction"); - verifyNotEnumerable(obj, "0"); - - verifyNotConfigurable(obj, "0"); - - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "0", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-7.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-7.js index bc90c7b983..1bc3fcfa22 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-7.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-7.js @@ -38,12 +38,13 @@ try { verifyEqualTo(obj, "prop", getFunc()); verifyWritable(obj, "prop", "verifySetFunction"); - - verifyNotEnumerable(obj, "prop"); - - verifyNotConfigurable(obj, "prop"); } +verifyProperty(obj, "prop", { + enumerable: false, + configurable: false, +}); + try { Object.defineProperty(obj, "prop", { set: function(value) { @@ -60,15 +61,14 @@ try { verifyWritable(obj, "prop", "verifySetFunction"); - verifyNotEnumerable(obj, "prop"); - - verifyNotConfigurable(obj, "prop"); - - if (!(e1 instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e1); } - } +verifyProperty(obj, "prop", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-8.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-8.js index 26be4c5177..cca11f6b53 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-8.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-540-8.js @@ -40,12 +40,13 @@ try { verifyEqualTo(obj, "0", getFunc()); verifyWritable(obj, "0", "verifySetFunction"); - - verifyNotEnumerable(obj, "0"); - - verifyNotConfigurable(obj, "0"); } +verifyProperty(obj, "0", { + enumerable: false, + configurable: false, +}); + try { Object.defineProperty(obj, "0", { set: function(value) { @@ -61,14 +62,14 @@ try { verifyWritable(obj, "0", "verifySetFunction"); - verifyNotEnumerable(obj, "0"); - - verifyNotConfigurable(obj, "0"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "0", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-542.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-542.js index 0768fd3034..d1effa9fe0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-542.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-542.js @@ -28,7 +28,8 @@ Object.defineProperty(obj, "prop", { configurable: false }); -assert(obj.hasOwnProperty("prop")); -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-546.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-546.js index bd266dbcb3..2cefdfbb7f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-546.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-546.js @@ -29,6 +29,7 @@ Object.defineProperty(obj, "prop", { configurable: false }); var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); +assert.sameValue(desc1.configurable, false); try { Object.defineProperty(obj, "prop", { @@ -38,12 +39,10 @@ try { throw new Test262Error("Expected TypeError"); } catch (e) { assert(e instanceof TypeError); - assert.sameValue(desc1.configurable, false); - - var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - assert.sameValue(desc2.configurable, false); - - verifyNotConfigurable(obj, "prop"); } +verifyProperty(obj, "prop", { + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-1.js index ae003f7fdd..24c73a6f46 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-1.js @@ -51,15 +51,14 @@ try { verifyWritable(obj, "0", "verifySetFunc"); - verifyEnumerable(obj, "0"); - - verifyNotConfigurable(obj, "0"); - - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "0", { + enumerable: true, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-2.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-2.js index 6b40da84ff..1fc93445ef 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-2.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-2.js @@ -53,15 +53,14 @@ try { verifyWritable(obj, "prop", "verifySetFunc"); - verifyEnumerable(obj, "prop"); - - verifyNotConfigurable(obj, "prop"); - - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "prop", { + enumerable: true, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-3.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-3.js index db6e0fdd62..3e3815b131 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-3.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-3.js @@ -51,14 +51,15 @@ try { verifyWritable(obj, "prop", "verifySetFunc"); - verifyEnumerable(obj, "prop"); - - verifyNotConfigurable(obj, "prop"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } } +verifyProperty(obj, "prop", { + enumerable: true, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-4.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-4.js index ffc954933e..f5261f8ce5 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-4.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-547-4.js @@ -51,15 +51,14 @@ try { verifyWritable(obj, "0", "verifySetFunc"); - verifyEnumerable(obj, "0"); - - verifyNotConfigurable(obj, "0"); - - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "0", { + enumerable: true, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-55.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-55.js index ca020589dd..7fced08f66 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-55.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-55.js @@ -28,8 +28,9 @@ verifyEqualTo(obj, "property", getFunc()); verifyWritable(obj, "property", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "property"); - -verifyConfigurable(obj, "property"); +verifyProperty(obj, "property", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-555.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-555.js index 96f0f78ea5..64d8596265 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-555.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-555.js @@ -36,6 +36,8 @@ Object.defineProperty(obj, "prop", { configurable: false }); -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-56.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-56.js index c5ea0ffad5..004dc7e27a 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-56.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-56.js @@ -27,8 +27,9 @@ verifyEqualTo(obj, "property", getFunc()); verifyWritable(obj, "property", "setVerifyHelpProp"); -verifyEnumerable(obj, "property"); - -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-560.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-560.js index 127e3d4d42..ce9172ee37 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-560.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-560.js @@ -28,7 +28,8 @@ Object.defineProperty(obj, "prop", { configurable: false }); -assert(obj.hasOwnProperty("prop")); -verifyNotConfigurable(obj, "prop"); +verifyProperty(obj, "prop", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-564.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-564.js index b4d0e29416..24c6c00d0b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-564.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-564.js @@ -28,7 +28,6 @@ Object.defineProperty(obj, "prop", { enumerable: false, configurable: false }); -var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); try { Object.defineProperty(obj, "prop", { @@ -38,8 +37,10 @@ try { throw new Test262Error("Expected TypeError"); } catch (e) { assert(e instanceof TypeError); - assert.sameValue(desc1.configurable, false); - verifyNotConfigurable(obj, "prop"); } +verifyProperty(obj, "prop", { + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-57.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-57.js index 5ad316ca51..3d010a65ec 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-57.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-57.js @@ -37,8 +37,9 @@ verifyEqualTo(obj, "property", getFunc()); verifyWritable(obj, "property", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "property"); - -verifyNotConfigurable(obj, "property"); +verifyProperty(obj, "property", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-58.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-58.js index d561f384f6..0e63b0085c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-58.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-58.js @@ -15,12 +15,12 @@ var obj = {}; obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true Object.defineProperty(obj, "foo", {}); -verifyEqualTo(obj, "foo", 101); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 101, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-59.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-59.js index 903ac63326..6621860c56 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-59.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-59.js @@ -30,8 +30,9 @@ verifyEqualTo(obj, "foo", getFunc()); verifyWritable(obj, "foo", "helpVerifySet"); -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-60.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-60.js index bb14e77bed..58699274f6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-60.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-60.js @@ -17,12 +17,12 @@ obj.foo = 101; // default value of attributes: writable: true, configurable: tru Object.defineProperty(obj, "foo", { value: "abc" }); -verifyEqualTo(obj, "foo", "abc"); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: "abc", + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-61.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-61.js index a59d8e6098..6e9ca52710 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-61.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-61.js @@ -19,12 +19,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { value: undefined }); -verifyEqualTo(obj, "foo", undefined); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-611.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-611.js index 19c0ef715c..29f1c7b0e6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-611.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-611.js @@ -6,33 +6,13 @@ es5id: 15.2.3.6-4-611 description: > ES5 Attributes - all attributes in Function.prototype.bind are correct +includes: [propertyHelper.js] ---*/ -var desc = Object.getOwnPropertyDescriptor(Function.prototype, "bind"); - -var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - -var temp = Function.prototype.bind; - -Function.prototype.bind = "2010"; - -var isWritable = (Function.prototype.bind === "2010"); - -var isEnumerable = false; - -for (var prop in Function.prototype) { - if (prop === "bind") { - isEnumerable = true; - } -} - -delete Function.prototype.bind; - -var isConfigurable = !Function.prototype.hasOwnProperty("bind"); - -assert(propertyAreCorrect, 'propertyAreCorrect !== true'); -assert(isWritable, 'isWritable !== true'); -assert.sameValue(isEnumerable, false, 'isEnumerable'); -assert(isConfigurable, 'isConfigurable !== true'); +verifyProperty(Function.prototype, "bind", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-612.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-612.js index e33d81a9c2..5669e33ad1 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-612.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-612.js @@ -6,33 +6,13 @@ es5id: 15.2.3.6-4-612 description: > ES5 Attributes - all attributes in Array.prototype.indexOf are correct +includes: [propertyHelper.js] ---*/ -var desc = Object.getOwnPropertyDescriptor(Array.prototype, "indexOf"); - -var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - -var temp = Array.prototype.indexOf; - -Array.prototype.indexOf = "2010"; - -var isWritable = (Array.prototype.indexOf === "2010"); - -var isEnumerable = false; - -for (var prop in Array.prototype) { - if (prop === "indexOf") { - isEnumerable = true; - } -} - -delete Array.prototype.indexOf; - -var isConfigurable = !Array.prototype.hasOwnProperty("indexOf"); - -assert(propertyAreCorrect, 'propertyAreCorrect !== true'); -assert(isWritable, 'isWritable !== true'); -assert.sameValue(isEnumerable, false, 'isEnumerable'); -assert(isConfigurable, 'isConfigurable !== true'); +verifyProperty(Array.prototype, "indexOf", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-613.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-613.js index 162333109f..3be61c6ded 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-613.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-613.js @@ -4,33 +4,13 @@ /*--- es5id: 15.2.3.6-4-613 description: ES5 Attributes - all attributes in Object.lastIndexOf are correct +includes: [propertyHelper.js] ---*/ -var desc = Object.getOwnPropertyDescriptor(Array.prototype, "lastIndexOf"); - -var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - -var temp = Array.prototype.lastIndexOf; - -Array.prototype.lastIndexOf = "2010"; - -var isWritable = (Array.prototype.lastIndexOf === "2010"); - -var isEnumerable = false; - -for (var prop in Array.prototype) { - if (prop === "lastIndexOf") { - isEnumerable = true; - } -} - -delete Array.prototype.lastIndexOf; - -var isConfigurable = !Array.prototype.hasOwnProperty("lastIndexOf"); - -assert(propertyAreCorrect, 'propertyAreCorrect !== true'); -assert(isWritable, 'isWritable !== true'); -assert.sameValue(isEnumerable, false, 'isEnumerable'); -assert(isConfigurable, 'isConfigurable !== true'); +verifyProperty(Array.prototype, "lastIndexOf", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-614.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-614.js index 368a3b8977..b4017c499c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-614.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-614.js @@ -6,33 +6,13 @@ es5id: 15.2.3.6-4-614 description: > ES5 Attributes - all attributes in Array.prototype.every are correct +includes: [propertyHelper.js] ---*/ -var desc = Object.getOwnPropertyDescriptor(Array.prototype, "every"); - -var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - -var temp = Array.prototype.every; - -Array.prototype.every = "2010"; - -var isWritable = (Array.prototype.every === "2010"); - -var isEnumerable = false; - -for (var prop in Array.prototype) { - if (prop === "every") { - isEnumerable = true; - } -} - -delete Array.prototype.every; - -var isConfigurable = !Array.prototype.hasOwnProperty("every"); - -assert(propertyAreCorrect, 'propertyAreCorrect !== true'); -assert(isWritable, 'isWritable !== true'); -assert.sameValue(isEnumerable, false, 'isEnumerable'); -assert(isConfigurable, 'isConfigurable !== true'); +verifyProperty(Array.prototype, "every", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-615.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-615.js index c4deed0cd6..de306634f0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-615.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-615.js @@ -4,33 +4,13 @@ /*--- es5id: 15.2.3.6-4-615 description: ES5 Attributes - all attributes in Array.prototype.some are correct +includes: [propertyHelper.js] ---*/ -var desc = Object.getOwnPropertyDescriptor(Array.prototype, "some"); - -var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - -var temp = Array.prototype.some; - -Array.prototype.some = "2010"; - -var isWritable = (Array.prototype.some === "2010"); - -var isEnumerable = false; - -for (var prop in Array.prototype) { - if (prop === "some") { - isEnumerable = true; - } -} - -delete Array.prototype.some; - -var isConfigurable = !Array.prototype.hasOwnProperty("some"); - -assert(propertyAreCorrect, 'propertyAreCorrect !== true'); -assert(isWritable, 'isWritable !== true'); -assert.sameValue(isEnumerable, false, 'isEnumerable'); -assert(isConfigurable, 'isConfigurable !== true'); +verifyProperty(Array.prototype, "some", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-616.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-616.js index d5547bda86..a55fea0497 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-616.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-616.js @@ -6,33 +6,13 @@ es5id: 15.2.3.6-4-616 description: > ES5 Attributes - all attributes in Array.prototype.forEach are correct +includes: [propertyHelper.js] ---*/ -var desc = Object.getOwnPropertyDescriptor(Array.prototype, "forEach"); - -var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - -var temp = Array.prototype.forEach; - -Array.prototype.forEach = "2010"; - -var isWritable = (Array.prototype.forEach === "2010"); - -var isEnumerable = false; - -for (var prop in Array.prototype) { - if (prop === "forEach") { - isEnumerable = true; - } -} - -delete Array.prototype.forEach; - -var isConfigurable = !Array.prototype.hasOwnProperty("forEach"); - -assert(propertyAreCorrect, 'propertyAreCorrect !== true'); -assert(isWritable, 'isWritable !== true'); -assert.sameValue(isEnumerable, false, 'isEnumerable'); -assert(isConfigurable, 'isConfigurable !== true'); +verifyProperty(Array.prototype, "forEach", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-617.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-617.js index 0d18438ceb..a2ba3ab540 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-617.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-617.js @@ -4,33 +4,13 @@ /*--- es5id: 15.2.3.6-4-617 description: ES5 Attributes - all attributes in Array.prototype.map are correct +includes: [propertyHelper.js] ---*/ -var desc = Object.getOwnPropertyDescriptor(Array.prototype, "map"); - -var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - -var temp = Array.prototype.map; - -Array.prototype.map = "2010"; - -var isWritable = (Array.prototype.map === "2010"); - -var isEnumerable = false; - -for (var prop in Array.prototype) { - if (prop === "map") { - isEnumerable = true; - } -} - -delete Array.prototype.map; - -var isConfigurable = !Array.prototype.hasOwnProperty("map"); - -assert(propertyAreCorrect, 'propertyAreCorrect !== true'); -assert(isWritable, 'isWritable !== true'); -assert.sameValue(isEnumerable, false, 'isEnumerable'); -assert(isConfigurable, 'isConfigurable !== true'); +verifyProperty(Array.prototype, "map", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-618.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-618.js index 3e21462908..8b7d744743 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-618.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-618.js @@ -6,33 +6,13 @@ es5id: 15.2.3.6-4-618 description: > ES5 Attributes - all attributes in Array.prototype.filter are correct +includes: [propertyHelper.js] ---*/ -var desc = Object.getOwnPropertyDescriptor(Array.prototype, "filter"); - -var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - -var temp = Array.prototype.filter; - -Array.prototype.filter = "2010"; - -var isWritable = (Array.prototype.filter === "2010"); - -var isEnumerable = false; - -for (var prop in Array.prototype) { - if (prop === "filter") { - isEnumerable = true; - } -} - -delete Array.prototype.filter; - -var isConfigurable = !Array.prototype.hasOwnProperty("filter"); - -assert(propertyAreCorrect, 'propertyAreCorrect !== true'); -assert(isWritable, 'isWritable !== true'); -assert.sameValue(isEnumerable, false, 'isEnumerable'); -assert(isConfigurable, 'isConfigurable !== true'); +verifyProperty(Array.prototype, "filter", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-619.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-619.js index 746209ea13..2bc25fcfe4 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-619.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-619.js @@ -6,33 +6,13 @@ es5id: 15.2.3.6-4-619 description: > ES5 Attributes - all attributes in Array.prototype.reduce are correct +includes: [propertyHelper.js] ---*/ -var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduce"); - -var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - -var temp = Array.prototype.reduce; - -Array.prototype.reduce = "2010"; - -var isWritable = (Array.prototype.reduce === "2010"); - -var isEnumerable = false; - -for (var prop in Array.prototype) { - if (prop === "reduce") { - isEnumerable = true; - } -} - -delete Array.prototype.reduce; - -var isConfigurable = !Array.prototype.hasOwnProperty("reduce"); - -assert(propertyAreCorrect, 'propertyAreCorrect !== true'); -assert(isWritable, 'isWritable !== true'); -assert.sameValue(isEnumerable, false, 'isEnumerable'); -assert(isConfigurable, 'isConfigurable !== true'); +verifyProperty(Array.prototype, "reduce", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-62.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-62.js index f16d18a98b..4faabfad64 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-62.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-62.js @@ -19,12 +19,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { value: null }); -verifyEqualTo(obj, "foo", null); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: null, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-620.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-620.js index 6ce2dbb7ce..d20710fc44 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-620.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-620.js @@ -6,33 +6,13 @@ es5id: 15.2.3.6-4-620 description: > ES5 Attributes - all attributes in Array.prototype.reduceRight are correct +includes: [propertyHelper.js] ---*/ -var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduceRight"); - -var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - -var temp = Array.prototype.reduceRight; - -Array.prototype.reduceRight = "2010"; - -var isWritable = (Array.prototype.reduceRight === "2010"); - -var isEnumerable = false; - -for (var prop in Array.prototype) { - if (prop === "reduceRight") { - isEnumerable = true; - } -} - -delete Array.prototype.reduceRight; - -var isConfigurable = !Array.prototype.hasOwnProperty("reduceRight"); - -assert(propertyAreCorrect, 'propertyAreCorrect !== true'); -assert(isWritable, 'isWritable !== true'); -assert.sameValue(isEnumerable, false, 'isEnumerable'); -assert(isConfigurable, 'isConfigurable !== true'); +verifyProperty(Array.prototype, "reduceRight", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-621.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-621.js index 5e00e1db4f..9bd87e96e3 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-621.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-621.js @@ -6,33 +6,13 @@ es5id: 15.2.3.6-4-621 description: > ES5 Attributes - all attributes in String.prototype.trim are correct +includes: [propertyHelper.js] ---*/ -var desc = Object.getOwnPropertyDescriptor(String.prototype, "trim"); - -var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - -var temp = String.prototype.trim; - -String.prototype.trim = "2010"; - -var isWritable = (String.prototype.trim === "2010"); - -var isEnumerable = false; - -for (var prop in String.prototype) { - if (prop === "trim") { - isEnumerable = true; - } -} - -delete String.prototype.trim; - -var isConfigurable = !String.prototype.hasOwnProperty("trim"); - -assert(propertyAreCorrect, 'propertyAreCorrect !== true'); -assert(isWritable, 'isWritable !== true'); -assert.sameValue(isEnumerable, false, 'isEnumerable'); -assert(isConfigurable, 'isConfigurable !== true'); +verifyProperty(String.prototype, "trim", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-622.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-622.js index db59aba810..fe21ad4d58 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-622.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-622.js @@ -4,33 +4,14 @@ /*--- es5id: 15.2.3.6-4-622 description: ES5 Attributes - all attributes in Date.now are correct +includes: [propertyHelper.js] ---*/ -var desc = Object.getOwnPropertyDescriptor(Date, "now"); +verifyProperty(Date, "now", { + writable: true, + enumerable: false, + configurable: true, +}); -var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - -var temp = Date.now; - -Date.now = "2010"; - -var isWritable = (Date.now === "2010"); - -var isEnumerable = false; - -for (var prop in Date) { - if (prop === "now") { - isEnumerable = true; - } -} - -delete Date.now; - -var isConfigurable = !Date.hasOwnProperty("now"); - -assert(propertyAreCorrect, 'propertyAreCorrect !== true'); -assert(isWritable, 'isWritable !== true'); -assert.sameValue(isEnumerable, false, 'isEnumerable'); -assert(isConfigurable, 'isConfigurable !== true'); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-623.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-623.js index a5c94f29b7..b314bc2c50 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-623.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-623.js @@ -6,33 +6,13 @@ es5id: 15.2.3.6-4-623 description: > ES5 Attributes - all attributes in Date.prototype.toISOString are correct +includes: [propertyHelper.js] ---*/ -var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toISOString"); - -var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - -var temp = Date.prototype.toISOString; - -Date.prototype.toISOString = "2010"; - -var isWritable = (Date.prototype.toISOString === "2010"); - -var isEnumerable = false; - -for (var prop in Date.prototype) { - if (prop === "toISOString") { - isEnumerable = true; - } -} - -delete Date.prototype.toISOString; - -var isConfigurable = !Date.prototype.hasOwnProperty("toISOString"); - -assert(propertyAreCorrect, 'propertyAreCorrect !== true'); -assert(isWritable, 'isWritable !== true'); -assert.sameValue(isEnumerable, false, 'isEnumerable'); -assert(isConfigurable, 'isConfigurable !== true'); +verifyProperty(Date.prototype, "toISOString", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-624.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-624.js index 4774991788..e2362387ca 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-624.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-624.js @@ -6,33 +6,13 @@ es5id: 15.2.3.6-4-624 description: > ES5 Attributes - all attributes in Date.prototype.toJSON are correct +includes: [propertyHelper.js] ---*/ -var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toJSON"); - -var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true); - -var temp = Date.prototype.toJSON; - -Date.prototype.toJSON = "2010"; - -var isWritable = (Date.prototype.toJSON === "2010"); - -var isEnumerable = false; - -for (var prop in Date.prototype) { - if (prop === "toJSON") { - isEnumerable = true; - } -} - -delete Date.prototype.toJSON; - -var isConfigurable = !Date.prototype.hasOwnProperty("toJSON"); - -assert(propertyAreCorrect, 'propertyAreCorrect !== true'); -assert(isWritable, 'isWritable !== true'); -assert.sameValue(isEnumerable, false, 'isEnumerable'); -assert(isConfigurable, 'isConfigurable !== true'); +verifyProperty(Date.prototype, "toJSON", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-63.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-63.js index feaf556cef..e92be049d0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-63.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-63.js @@ -19,12 +19,11 @@ Object.defineProperty(obj, "foo", { value: NaN }); -assert.sameValue(obj.foo, NaN); - -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: NaN, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-64.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-64.js index d627e8a13f..53599d36c6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-64.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-64.js @@ -23,18 +23,16 @@ try { throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", -0); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: -0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-65.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-65.js index ed2ac2cc12..f0abc12984 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-65.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-65.js @@ -22,18 +22,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", +0); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: +0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-66.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-66.js index 87fe39bdbd..3339c81706 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-66.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-66.js @@ -17,12 +17,12 @@ obj.foo = 101; // default value of attributes: writable: true, configurable: tru Object.defineProperty(obj, "foo", { value: 102 }); -verifyEqualTo(obj, "foo", 102); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 102, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-67.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-67.js index 6778b65e76..ab0c3fce02 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-67.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-67.js @@ -20,12 +20,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { value: "abcd" }); -verifyEqualTo(obj, "foo", "abcd"); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: "abcd", + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-68.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-68.js index f3f74ca0b1..e914ee7275 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-68.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-68.js @@ -17,12 +17,12 @@ obj.foo = "abcd"; // default value of attributes: writable: true, configurable: Object.defineProperty(obj, "foo", { value: "fghj" }); -verifyEqualTo(obj, "foo", "fghj"); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: "fghj", + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-69.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-69.js index 39244aa40a..682db19208 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-69.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-69.js @@ -19,12 +19,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { value: true }); -verifyEqualTo(obj, "foo", true); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: true, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-70.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-70.js index 24d4977637..c431b43b55 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-70.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-70.js @@ -17,12 +17,12 @@ obj.foo = true; // default value of attributes: writable: true, configurable: tr Object.defineProperty(obj, "foo", { value: false }); -verifyEqualTo(obj, "foo", false); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: false, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-71.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-71.js index c12aa123b1..146f1b2a92 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-71.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-71.js @@ -23,12 +23,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { value: obj1 }); -verifyEqualTo(obj, "foo", obj1); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: obj1, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-72.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-72.js index 36c4fe3a34..2e10a620e6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-72.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-72.js @@ -24,12 +24,12 @@ var obj2 = { Object.defineProperty(obj, "foo", { value: obj2 }); -verifyEqualTo(obj, "foo", obj2); -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: obj2, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-73.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-73.js index e003f7060f..19ee10354a 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-73.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-73.js @@ -19,12 +19,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { writable: false }); -verifyEqualTo(obj, "foo", undefined); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-74.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-74.js index 735ff9e36d..a711a14148 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-74.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-74.js @@ -20,12 +20,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { writable: true }); -verifyEqualTo(obj, "foo", undefined); -verifyWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-75.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-75.js index ffb8fa59fc..b51fe84c77 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-75.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-75.js @@ -32,8 +32,9 @@ verifyEqualTo(obj, "foo", getFunc()); verifyWritable(obj, "foo", "helpVerifySet"); -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-76.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-76.js index 91a011f019..b6b16ff6ac 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-76.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-76.js @@ -37,8 +37,9 @@ verifyEqualTo(obj, "foo", getFunc2()); verifyWritable(obj, "foo", "helpVerifySet"); -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-77.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-77.js index 11813c0338..6e9275c910 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-77.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-77.js @@ -25,8 +25,9 @@ Object.defineProperty(obj, "foo", { }); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-78.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-78.js index 9ffdeb435b..7be495b41e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-78.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-78.js @@ -28,8 +28,9 @@ Object.defineProperty(obj, "foo", { }); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-79.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-79.js index 0295f90eef..f82e5431b1 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-79.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-79.js @@ -19,12 +19,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { enumerable: false }); -verifyEqualTo(obj, "foo", undefined); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-80.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-80.js index 06c6f05859..f2595e67e6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-80.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-80.js @@ -20,12 +20,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { enumerable: true }); -verifyEqualTo(obj, "foo", undefined); -verifyNotWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: false, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-81.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-81.js index bb04cb882d..88b4844633 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-81.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-81.js @@ -19,12 +19,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { configurable: false }); -verifyEqualTo(obj, "foo", undefined); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-1.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-1.js index b2a9b4b8ae..c5dfda4bc9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-1.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-1.js @@ -27,12 +27,11 @@ Object.defineProperty(obj, "foo", { enumerable: false }); -verifyEqualTo(obj, "foo", 1001); - -verifyWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 1001, + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-10.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-10.js index 4c2395e14d..ac6298f340 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-10.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-10.js @@ -38,8 +38,9 @@ verifyEqualTo(obj, "foo", get_func()); verifyWritable(obj, "foo", "verifySetFunction"); -verifyEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-11.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-11.js index 0fefd5de68..416f684952 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-11.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-11.js @@ -38,8 +38,9 @@ verifyEqualTo(obj, "foo", get_func()); verifyWritable(obj, "foo", "verifySetFunction"); -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-12.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-12.js index ba8dd041b1..14e09775c2 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-12.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-12.js @@ -37,8 +37,9 @@ verifyEqualTo(obj, "foo", get_func()); verifyWritable(obj, "foo", "verifySetFunction"); -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-13.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-13.js index 4e954f0939..0e3cd8165c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-13.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-13.js @@ -27,12 +27,11 @@ Object.defineProperty(obj, "0", { enumerable: false }); -verifyEqualTo(obj, "0", 1001); - -verifyWritable(obj, "0"); - -verifyNotEnumerable(obj, "0"); - -verifyConfigurable(obj, "0"); +verifyProperty(obj, "0", { + value: 1001, + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-14.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-14.js index b91f538d57..3f21dbcd94 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-14.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-14.js @@ -28,12 +28,11 @@ Object.defineProperty(obj, "0", { configurable: true }); -verifyEqualTo(obj, "0", 1001); - -verifyWritable(obj, "0"); - -verifyNotEnumerable(obj, "0"); - -verifyConfigurable(obj, "0"); +verifyProperty(obj, "0", { + value: 1001, + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-15.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-15.js index 5a88b4781c..49d20e8780 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-15.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-15.js @@ -26,12 +26,11 @@ Object.defineProperty(obj, "0", { configurable: false }); -verifyEqualTo(obj, "0", 1001); - -verifyWritable(obj, "0"); - -verifyEnumerable(obj, "0"); - -verifyNotConfigurable(obj, "0"); +verifyProperty(obj, "0", { + value: 1001, + writable: true, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-16.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-16.js index fe07c56e74..b22ff1fb7c 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-16.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-16.js @@ -28,12 +28,11 @@ Object.defineProperty(obj, "0", { configurable: false }); -verifyEqualTo(obj, "0", 1001); - -verifyWritable(obj, "0"); - -verifyEnumerable(obj, "0"); - -verifyNotConfigurable(obj, "0"); +verifyProperty(obj, "0", { + value: 1001, + writable: true, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-17.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-17.js index de43ae8048..acac52e8c1 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-17.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-17.js @@ -28,12 +28,11 @@ Object.defineProperty(obj, "0", { configurable: false }); -verifyEqualTo(obj, "0", 1001); - -verifyWritable(obj, "0"); - -verifyNotEnumerable(obj, "0"); - -verifyNotConfigurable(obj, "0"); +verifyProperty(obj, "0", { + value: 1001, + writable: true, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-18.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-18.js index 30b44c922c..063c7d48a1 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-18.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-18.js @@ -27,12 +27,11 @@ Object.defineProperty(obj, "0", { enumerable: true }); -verifyEqualTo(obj, "0", 1001); - -verifyWritable(obj, "0"); - -verifyEnumerable(obj, "0"); - -verifyConfigurable(obj, "0"); +verifyProperty(obj, "0", { + value: 1001, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-19.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-19.js index b8776f7da0..894860a0a6 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-19.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-19.js @@ -37,8 +37,9 @@ verifyEqualTo(obj, "0", get_func()); verifyWritable(obj, "0", "verifySetFunction"); -verifyNotEnumerable(obj, "0"); - -verifyConfigurable(obj, "0"); +verifyProperty(obj, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-2.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-2.js index e5093aeec7..0c3c12cb09 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-2.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-2.js @@ -28,12 +28,11 @@ Object.defineProperty(obj, "foo", { configurable: true }); -verifyEqualTo(obj, "foo", 1001); - -verifyWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 1001, + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-20.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-20.js index 4b4ee70a99..d05a255134 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-20.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-20.js @@ -38,8 +38,9 @@ verifyEqualTo(obj, "0", get_func()); verifyWritable(obj, "0", "verifySetFunction"); -verifyNotEnumerable(obj, "0"); - -verifyConfigurable(obj, "0"); +verifyProperty(obj, "0", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-21.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-21.js index f4d984ef54..c3f45f0fb5 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-21.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-21.js @@ -37,8 +37,9 @@ verifyEqualTo(obj, "0", get_func()); verifyWritable(obj, "0", "verifySetFunction"); -verifyEnumerable(obj, "0"); - -verifyNotConfigurable(obj, "0"); +verifyProperty(obj, "0", { + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-22.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-22.js index 4df84cf130..88c4a33a60 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-22.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-22.js @@ -38,8 +38,9 @@ verifyEqualTo(obj, "0", get_func()); verifyWritable(obj, "0", "verifySetFunction"); -verifyEnumerable(obj, "0"); - -verifyNotConfigurable(obj, "0"); +verifyProperty(obj, "0", { + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-23.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-23.js index a313d8ed02..8c9693671f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-23.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-23.js @@ -38,8 +38,9 @@ verifyEqualTo(obj, "0", get_func()); verifyWritable(obj, "0", "verifySetFunction"); -verifyNotEnumerable(obj, "0"); - -verifyNotConfigurable(obj, "0"); +verifyProperty(obj, "0", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-24.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-24.js index fd2e6d537b..199a0c8f9e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-24.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-24.js @@ -37,8 +37,9 @@ verifyEqualTo(obj, "0", get_func()); verifyWritable(obj, "0", "verifySetFunction"); -verifyEnumerable(obj, "0"); - -verifyConfigurable(obj, "0"); +verifyProperty(obj, "0", { + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-3.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-3.js index f031e54a38..083cd2a349 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-3.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-3.js @@ -26,12 +26,11 @@ Object.defineProperty(obj, "foo", { configurable: false }); -verifyEqualTo(obj, "foo", 1001); - -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 1001, + writable: true, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-4.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-4.js index 9e6bd3600a..341f8055ba 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-4.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-4.js @@ -28,12 +28,11 @@ Object.defineProperty(obj, "foo", { configurable: false }); -verifyEqualTo(obj, "foo", 1001); - -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 1001, + writable: true, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-5.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-5.js index d0dae554c5..431ae80ae1 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-5.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-5.js @@ -28,12 +28,11 @@ Object.defineProperty(obj, "foo", { configurable: false }); -verifyEqualTo(obj, "foo", 1001); - -verifyWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 1001, + writable: true, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-6.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-6.js index 265df4a1bb..c5821b1bba 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-6.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-6.js @@ -27,12 +27,11 @@ Object.defineProperty(obj, "foo", { enumerable: true }); -verifyEqualTo(obj, "foo", 1001); - -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 1001, + writable: true, + enumerable: true, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-7.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-7.js index 72e6355d42..d41b441ab0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-7.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-7.js @@ -37,8 +37,9 @@ verifyEqualTo(obj, "foo", get_func()); verifyWritable(obj, "foo", "verifySetFunction"); -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-8.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-8.js index 1238652846..3404e81fe0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-8.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-8.js @@ -38,8 +38,9 @@ verifyEqualTo(obj, "foo", get_func()); verifyWritable(obj, "foo", "verifySetFunction"); -verifyNotEnumerable(obj, "foo"); - -verifyConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-9.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-9.js index 7f7b8b7a1d..e8a7bdfb6e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-9.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82-9.js @@ -37,8 +37,9 @@ verifyEqualTo(obj, "foo", get_func()); verifyWritable(obj, "foo", "verifySetFunction"); -verifyEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82.js index f80c1afff1..961ee791bb 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-82.js @@ -19,12 +19,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { configurable: false }); -verifyEqualTo(obj, "foo", undefined); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-83.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-83.js index c9fb22b3d7..34d5c23c1f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-83.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-83.js @@ -24,12 +24,12 @@ Object.defineProperty(obj, "foo", { writable: false, configurable: false }); -verifyEqualTo(obj, "foo", undefined); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: undefined, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-84.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-84.js index fdb49395ee..cd1857b57f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-84.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-84.js @@ -24,12 +24,12 @@ Object.defineProperty(obj, "foo", { writable: false, configurable: false }); -verifyEqualTo(obj, "foo", null); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: null, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-85.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-85.js index 882a018143..077358427d 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-85.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-85.js @@ -24,12 +24,11 @@ Object.defineProperty(obj, "foo", { configurable: false }); -assert.sameValue(obj.foo, NaN); - -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: NaN, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-86.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-86.js index 1bf35f3460..e06026db5f 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-86.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-86.js @@ -25,18 +25,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", -0); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: -0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-87.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-87.js index cbf3421f4e..bb440cdfab 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-87.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-87.js @@ -25,18 +25,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", +0); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: +0, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-88.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-88.js index 27b56ee337..acf4b9ef0b 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-88.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-88.js @@ -23,12 +23,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { value: 100 }); -verifyEqualTo(obj, "foo", 100); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 100, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-89.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-89.js index a8b3ba707f..c2486ea1c9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-89.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-89.js @@ -25,18 +25,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", 10); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: 10, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-90.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-90.js index 07438a7406..e5909987a0 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-90.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-90.js @@ -23,12 +23,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { value: "abcd" }); -verifyEqualTo(obj, "foo", "abcd"); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: "abcd", + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-91.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-91.js index 665ae48b79..b8b341634e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-91.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-91.js @@ -25,18 +25,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", "abcd"); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: "abcd", + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-92.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-92.js index 780ad68e54..5eea0ded00 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-92.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-92.js @@ -23,12 +23,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { value: false }); -verifyEqualTo(obj, "foo", false); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: false, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-93.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-93.js index 27113a056f..ae20af55cb 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-93.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-93.js @@ -25,18 +25,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", false); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: false, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-94.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-94.js index 6a3a90950d..62816a425e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-94.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-94.js @@ -27,12 +27,12 @@ Object.defineProperty(obj, "foo", { Object.defineProperty(obj, "foo", { value: obj1 }); -verifyEqualTo(obj, "foo", obj1); -verifyNotWritable(obj, "foo"); - -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: obj1, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-95.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-95.js index 9590be199b..d88f1f6a86 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-95.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-95.js @@ -34,18 +34,16 @@ try { }); throw new Test262Error("Expected an exception."); } catch (e) { - verifyEqualTo(obj, "foo", obj1); - - verifyNotWritable(obj, "foo"); - - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + value: obj1, + writable: false, + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-96.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-96.js index 6cc17c467e..f0629223d7 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-96.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-96.js @@ -27,8 +27,9 @@ Object.defineProperty(obj, "foo", { }); verifyWritable(obj, "foo", "setVerifyHelpProp"); -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-97.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-97.js index 6e3d07a24b..8a5ada0331 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-97.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-97.js @@ -33,14 +33,14 @@ try { } catch (e) { verifyEqualTo(obj, "property", getFunc()); - verifyNotEnumerable(obj, "property"); - - verifyNotConfigurable(obj, "property"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "property", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-98.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-98.js index 0b54b241d5..99cd678b2a 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-98.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-98.js @@ -35,8 +35,9 @@ verifyEqualTo(obj, "foo", getFunc()); verifyWritable(obj, "foo", "verifyGetHelpMethod"); -verifyNotEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-99.js b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-99.js index bc8efa7208..2d0cd0e7da 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-99.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/15.2.3.6-4-99.js @@ -35,14 +35,14 @@ try { } catch (e) { verifyWritable(obj, "foo", "setVerifyHelpProp"); - verifyNotEnumerable(obj, "foo"); - - verifyNotConfigurable(obj, "foo"); - if (!(e instanceof TypeError)) { throw new Test262Error("Expected TypeError, got " + e); } - } +verifyProperty(obj, "foo", { + enumerable: false, + configurable: false, +}); + reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/name.js b/js/src/tests/test262/built-ins/Object/defineProperty/name.js index 93e3066236..277210934e 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/name.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.defineProperty.name, "defineProperty"); - -verifyNotEnumerable(Object.defineProperty, "name"); -verifyNotWritable(Object.defineProperty, "name"); -verifyConfigurable(Object.defineProperty, "name"); +verifyProperty(Object.defineProperty, "name", { + value: "defineProperty", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/defineProperty/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/defineProperty/not-a-constructor.js index 8c49a7085c..4b5af11af9 100644 --- a/js/src/tests/test262/built-ins/Object/defineProperty/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/defineProperty/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.defineProperty({}, '', {}); -}, '`new Object.defineProperty({}, \'\', {})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/entries/function-length.js b/js/src/tests/test262/built-ins/Object/entries/function-length.js index 6510ac12b6..297c3acb8b 100644 --- a/js/src/tests/test262/built-ins/Object/entries/function-length.js +++ b/js/src/tests/test262/built-ins/Object/entries/function-length.js @@ -8,10 +8,11 @@ author: Jordan Harband includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.entries.length, 1, 'Expected Object.entries.length to be 1'); - -verifyNotEnumerable(Object.entries, 'length'); -verifyNotWritable(Object.entries, 'length'); -verifyConfigurable(Object.entries, 'length'); +verifyProperty(Object.entries, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/entries/function-name.js b/js/src/tests/test262/built-ins/Object/entries/function-name.js index ddc50048d8..981386649c 100644 --- a/js/src/tests/test262/built-ins/Object/entries/function-name.js +++ b/js/src/tests/test262/built-ins/Object/entries/function-name.js @@ -8,14 +8,11 @@ author: Jordan Harband includes: [propertyHelper.js] ---*/ -assert.sameValue( - Object.entries.name, - 'entries', - 'Expected Object.entries.name to be "entries"' -); - -verifyNotEnumerable(Object.entries, 'name'); -verifyNotWritable(Object.entries, 'name'); -verifyConfigurable(Object.entries, 'name'); +verifyProperty(Object.entries, "name", { + value: "entries", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/entries/function-property-descriptor.js b/js/src/tests/test262/built-ins/Object/entries/function-property-descriptor.js index a1ed98ba44..35bb70debf 100644 --- a/js/src/tests/test262/built-ins/Object/entries/function-property-descriptor.js +++ b/js/src/tests/test262/built-ins/Object/entries/function-property-descriptor.js @@ -8,8 +8,10 @@ author: Jordan Harband includes: [propertyHelper.js] ---*/ -verifyNotEnumerable(Object, 'entries'); -verifyWritable(Object, 'entries'); -verifyConfigurable(Object, 'entries'); +verifyProperty(Object, "entries", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/entries/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/entries/not-a-constructor.js index cab5f1d2e6..5c53c08703 100644 --- a/js/src/tests/test262/built-ins/Object/entries/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/entries/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Object.entries), false, 'isConstructor(Object.ent assert.throws(TypeError, () => { new Object.entries({}); -}, '`new Object.entries({})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-4.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-4.js index d1c0131160..812183048a 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-4.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-4.js @@ -17,8 +17,9 @@ Object.defineProperty(obj, "foo", { Object.freeze(obj); -assert(obj.hasOwnProperty("foo")); -verifyNotWritable(obj, "foo"); -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + writable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-1.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-1.js index a03d148d17..49575f4042 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-1.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-1.js @@ -13,9 +13,10 @@ obj.foo = 10; // default [[Configurable]] attribute value of foo: true Object.freeze(obj); -verifyNotWritable(obj, "foo"); -verifyNotConfigurable(obj, "foo"); - -assert.sameValue(obj.foo, 10); +verifyProperty(obj, "foo", { + value: 10, + writable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-10.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-10.js index ac66e48f32..4f8efb99c8 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-10.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-10.js @@ -15,9 +15,10 @@ arrObj.foo = 10; // default [[Configurable]] attribute value of foo: true Object.freeze(arrObj); -verifyNotWritable(arrObj, "foo"); -verifyNotConfigurable(arrObj, "foo"); - -assert.sameValue(arrObj.foo, 10); +verifyProperty(arrObj, "foo", { + value: 10, + writable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-11.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-11.js index b9db664525..4e4fe8ac10 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-11.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-11.js @@ -17,10 +17,10 @@ var argObj = (function() { Object.freeze(argObj); -var desc = Object.getOwnPropertyDescriptor(argObj, "0"); - -verifyNotWritable(argObj, "0"); -verifyNotConfigurable(argObj, "0"); -assert.sameValue(argObj[0], 1); +verifyProperty(argObj, "0", { + value: 1, + writable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-12.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-12.js index 1eb5dbbc11..4072d7b0f1 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-12.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-12.js @@ -15,9 +15,10 @@ var strObj = new String("abc"); Object.freeze(strObj); -verifyNotWritable(strObj, "0"); -verifyNotConfigurable(strObj, "0"); - -assert.sameValue(strObj[0], "a"); +verifyProperty(strObj, "0", { + value: "a", + writable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-13.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-13.js index c4d1fa96be..41ce47b491 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-13.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-13.js @@ -17,9 +17,10 @@ var obj = { Object.freeze(obj); -verifyNotWritable(obj, "0"); -verifyNotConfigurable(obj, "0"); - -assert.sameValue(obj[0], 0); +verifyProperty(obj, "0", { + value: 0, + writable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-14.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-14.js index eecc860739..f14cf55984 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-14.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-14.js @@ -14,8 +14,10 @@ var arrObj = [0, 1, 2]; Object.freeze(arrObj); -verifyNotWritable(arrObj, "0"); -verifyNotConfigurable(arrObj, "0"); -assert.sameValue(arrObj[0], 0); +verifyProperty(arrObj, "0", { + value: 0, + writable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-2.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-2.js index 3bf26de301..94daf9f243 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-2.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-2.js @@ -23,9 +23,10 @@ child.foo = 10; // default [[Configurable]] attribute value of foo: true Object.freeze(child); -verifyNotWritable(child, "foo"); -verifyNotConfigurable(child, "foo"); - -assert.sameValue(child.foo, 10); +verifyProperty(child, "foo", { + value: 10, + writable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-3.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-3.js index 9e70497f78..00faf0bfc8 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-3.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-3.js @@ -29,8 +29,10 @@ Object.defineProperty(child, "foo", { Object.freeze(child); -verifyNotWritable(child, "foo"); -verifyNotConfigurable(child, "foo"); -assert.sameValue(child.foo, 10); +verifyProperty(child, "foo", { + value: 10, + writable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-4.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-4.js index acdfed7f01..be1ed8c528 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-4.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-4.js @@ -18,7 +18,10 @@ Object.defineProperty(obj, "foo", { Object.freeze(obj); -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + configurable: false, +}); + assert.sameValue(obj.foo, 10); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-5.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-5.js index 00ff5bfc63..f08d411009 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-5.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-5.js @@ -28,7 +28,10 @@ Object.defineProperty(child, "foo", { Object.freeze(child); -verifyNotConfigurable(child, "foo"); +verifyProperty(child, "foo", { + configurable: false, +}); + assert.sameValue(child.foo, 10); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-6.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-6.js index 163d0a951e..a1e8b22dac 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-6.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-6.js @@ -32,7 +32,10 @@ Object.defineProperty(child, "foo", { Object.freeze(child); -verifyNotConfigurable(child, "foo"); +verifyProperty(child, "foo", { + configurable: false, +}); + assert.sameValue(child.foo, 10); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-7.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-7.js index c8de353b20..5243d62cec 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-7.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-7.js @@ -17,8 +17,10 @@ argObj.foo = 10; // default [[Configurable]] attribute value of foo: true Object.freeze(argObj); -verifyNotWritable(argObj, "foo"); -verifyNotConfigurable(argObj, "foo"); -assert.sameValue(argObj.foo, 10); +verifyProperty(argObj, "foo", { + value: 10, + writable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-8.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-8.js index f930bdee5f..d7eabe58ec 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-8.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-8.js @@ -15,8 +15,10 @@ strObj.foo = 10; // default [[Configurable]] attribute value of foo: true Object.freeze(strObj); -verifyNotWritable(strObj, "foo"); -verifyNotConfigurable(strObj, "foo"); -assert.sameValue(strObj.foo, 10); +verifyProperty(strObj, "foo", { + value: 10, + writable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-9.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-9.js index 2d2c722646..f79a8ba921 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-9.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-a-9.js @@ -15,9 +15,10 @@ funObj.foo = 10; // default [[Configurable]] attribute value of foo: true Object.freeze(funObj); -verifyNotWritable(funObj, "foo"); -verifyNotConfigurable(funObj, "foo"); - -assert.sameValue(funObj.foo, 10); +verifyProperty(funObj, "foo", { + value: 10, + writable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-b-i-1.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-b-i-1.js index 4c6c953c7b..26e0c0cb37 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-b-i-1.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-b-i-1.js @@ -19,22 +19,12 @@ Object.defineProperty(obj, "foo", { }); Object.freeze(obj); -var desc = Object.getOwnPropertyDescriptor(obj, "foo"); -verifyEqualTo(obj, "foo", 10); - -verifyNotWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); - -if (desc.writable !== false) { - throw new Test262Error('Expected desc.writable === false, actually ' + desc.writable); -} - -if (desc.configurable !== false) { - throw new Test262Error('Expected desc.configurable === false, actually ' + desc.configurable); -} +verifyProperty(obj, "foo", { + value: 10, + writable: false, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-b-i-2.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-b-i-2.js index 2d8a00a53b..bb6fd6bcf2 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-b-i-2.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-b-i-2.js @@ -28,39 +28,18 @@ Object.defineProperty(obj, "foo2", { Object.freeze(obj); -var desc1 = Object.getOwnPropertyDescriptor(obj, "foo1"); -var desc2 = Object.getOwnPropertyDescriptor(obj, "foo2"); - -verifyEqualTo(obj, "foo1", 10); - -verifyNotWritable(obj, "foo1"); - -verifyEnumerable(obj, "foo1"); - -verifyNotConfigurable(obj, "foo1"); - -verifyEqualTo(obj, "foo2", 20); - -verifyNotWritable(obj, "foo2"); - -verifyNotEnumerable(obj, "foo2"); - -verifyNotConfigurable(obj, "foo2"); - -if (desc1.configurable !== false) { - throw new Test262Error('Expected desc1.configurable === false, actually ' + desc1.configurable); -} - -if (desc1.writable !== false) { - throw new Test262Error('Expected desc1.writable === false, actually ' + desc1.writable); -} - -if (desc2.configurable !== false) { - throw new Test262Error('Expected desc2.configurable === false, actually ' + desc2.configurable); -} +verifyProperty(obj, "foo1", { + value: 10, + writable: false, + enumerable: true, + configurable: false, +}); -if (desc2.writable !== false) { - throw new Test262Error('Expected desc2.writable === false, actually ' + desc2.writable); -} +verifyProperty(obj, "foo2", { + value: 20, + writable: false, + enumerable: false, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-1.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-1.js index 219519195c..4969d18425 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-1.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-1.js @@ -21,21 +21,11 @@ Object.defineProperty(obj, "foo", { Object.freeze(obj); -var desc = Object.getOwnPropertyDescriptor(obj, "foo"); - -if (desc.configurable !== false) { - throw new Test262Error("Expected desc.configurable to be false, actually " + desc.configurable); -} -if (desc.writable !== false) { - throw new Test262Error("Expected desc.writable to be false, actually " + desc.writable); -} - -verifyEqualTo(obj, "foo", 10); - -verifyNotWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 10, + writable: false, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-2.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-2.js index af0797a00d..c59e8e068a 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-2.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-2.js @@ -31,17 +31,18 @@ Object.defineProperty(obj, "foo", { Object.freeze(obj); -assert(obj.hasOwnProperty("foo")); -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + configurable: false, +}); assert.sameValue(obj.foo, 10); obj.foo = 12; assert(set_funcCalled); -verifyEnumerable(obj, "foo"); - -var desc = Object.getOwnPropertyDescriptor(obj, "foo"); -assert.sameValue(desc.configurable, false); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-3.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-3.js index 24be086754..9ac2917a53 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-3.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-3.js @@ -37,7 +37,10 @@ Object.defineProperty(obj, "foo2", { Object.freeze(obj); -verifyNotConfigurable(obj, "foo2"); +verifyProperty(obj, "foo2", { + configurable: false, +}); + verifyEqualTo(obj, "foo2", 10); obj.foo2 = 12; @@ -45,26 +48,21 @@ if (!resultSetFun) { throw new Test262Error('Expected obj["foo2"] set() to be called, but was not.'); } -if (!isEnumerable(obj, "foo2")) { - throw new Test262Error('Expected obj["foo2"] to be enumerable.'); -} - -var desc1 = Object.getOwnPropertyDescriptor(obj, "foo1"); -if (desc1.configurable || desc1.writable) { - throw new Test262Error('Expected obj["foo1"] to be non-writable, non-configurable; actually ' + JSON.stringify(desc1)); -} +verifyProperty(obj, "foo2", { + enumerable: true, + configurable: false, +}); var desc2 = Object.getOwnPropertyDescriptor(obj, "foo2"); -if (desc2.configurable || desc2.writable) { +if (desc2.writable) { throw new Test262Error('Expected obj["foo2"] to be non-writable, non-configurable; actually ' + JSON.stringify(desc2)); } -verifyEqualTo(obj, "foo1", 10); - -verifyNotWritable(obj, "foo1"); - -verifyEnumerable(obj, "foo1"); - -verifyNotConfigurable(obj, "foo1"); +verifyProperty(obj, "foo1", { + value: 10, + writable: false, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-4.js b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-4.js index 49390cbf84..f211cbeb73 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-4.js +++ b/js/src/tests/test262/built-ins/Object/freeze/15.2.3.9-2-c-4.js @@ -38,31 +38,30 @@ Object.freeze(obj); verifyEqualTo(obj, "foo2", 10); -verifyNotConfigurable(obj, "foo2"); +verifyProperty(obj, "foo2", { + configurable: false, +}); obj.foo2 = 12; if (!resultSetFun) { throw new Test262Error('Expected obj["foo2"] set() to be called, but was not.'); } -verifyEnumerable(obj, "foo2"); - -var desc1 = Object.getOwnPropertyDescriptor(obj, "foo1"); -if (desc1.configurable || desc1.writable) { - throw new Test262Error('Expected obj["foo1"] to be non-writable, non-configurable; actually ' + JSON.stringify(desc1)); -} +verifyProperty(obj, "foo2", { + enumerable: true, + configurable: false, +}); var desc2 = Object.getOwnPropertyDescriptor(obj, "foo2"); -if (desc2.configurable || desc2.writable) { +if (desc2.writable) { throw new Test262Error('Expected obj["foo2"] to be non-writable, non-configurable; actually ' + JSON.stringify(desc2)); } -verifyEqualTo(obj, "foo1", 10); - -verifyNotWritable(obj, "foo1"); - -verifyEnumerable(obj, "foo1"); - -verifyNotConfigurable(obj, "foo1"); +verifyProperty(obj, "foo1", { + value: 10, + writable: false, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/name.js b/js/src/tests/test262/built-ins/Object/freeze/name.js index 1881d15751..c9f8c5115b 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/name.js +++ b/js/src/tests/test262/built-ins/Object/freeze/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.freeze.name, "freeze"); - -verifyNotEnumerable(Object.freeze, "name"); -verifyNotWritable(Object.freeze, "name"); -verifyConfigurable(Object.freeze, "name"); +verifyProperty(Object.freeze, "name", { + value: "freeze", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/freeze/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/freeze/not-a-constructor.js index 6d928f4f11..d4f1eadcfb 100644 --- a/js/src/tests/test262/built-ins/Object/freeze/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/freeze/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Object.freeze), false, 'isConstructor(Object.free assert.throws(TypeError, () => { new Object.freeze({}); -}, '`new Object.freeze({})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/fromEntries/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/fromEntries/not-a-constructor.js index d63a99663e..7c83209db1 100644 --- a/js/src/tests/test262/built-ins/Object/fromEntries/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/fromEntries/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Object.fromEntries), false, 'isConstructor(Object assert.throws(TypeError, () => { new Object.fromEntries([]); -}, '`new Object.fromEntries([])` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/name.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/name.js index 8752810f81..377656f7dd 100644 --- a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/name.js +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.getOwnPropertyDescriptor.name, "getOwnPropertyDescriptor"); - -verifyNotEnumerable(Object.getOwnPropertyDescriptor, "name"); -verifyNotWritable(Object.getOwnPropertyDescriptor, "name"); -verifyConfigurable(Object.getOwnPropertyDescriptor, "name"); +verifyProperty(Object.getOwnPropertyDescriptor, "name", { + value: "getOwnPropertyDescriptor", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/not-a-constructor.js index af851726d6..e48a450826 100644 --- a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptor/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.getOwnPropertyDescriptor({}, ''); -}, '`new Object.getOwnPropertyDescriptor({}, \'\')` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/function-length.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/function-length.js index 8c1746ba9c..223cd5b1b4 100644 --- a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/function-length.js +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/function-length.js @@ -8,10 +8,11 @@ author: Jordan Harband includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.getOwnPropertyDescriptors.length, 1, 'Expected Object.getOwnPropertyDescriptors.length to be 1'); - -verifyNotEnumerable(Object.getOwnPropertyDescriptors, 'length'); -verifyNotWritable(Object.getOwnPropertyDescriptors, 'length'); -verifyConfigurable(Object.getOwnPropertyDescriptors, 'length'); +verifyProperty(Object.getOwnPropertyDescriptors, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/function-name.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/function-name.js index 7037128d72..a718eb883c 100644 --- a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/function-name.js +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/function-name.js @@ -8,14 +8,11 @@ author: Jordan Harband includes: [propertyHelper.js] ---*/ -assert.sameValue( - Object.getOwnPropertyDescriptors.name, - 'getOwnPropertyDescriptors', - 'Expected Object.getOwnPropertyDescriptors.name to be "getOwnPropertyDescriptors"' -); - -verifyNotEnumerable(Object.getOwnPropertyDescriptors, 'name'); -verifyNotWritable(Object.getOwnPropertyDescriptors, 'name'); -verifyConfigurable(Object.getOwnPropertyDescriptors, 'name'); +verifyProperty(Object.getOwnPropertyDescriptors, "name", { + value: "getOwnPropertyDescriptors", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/function-property-descriptor.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/function-property-descriptor.js index 2182f1234b..1d305b6d83 100644 --- a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/function-property-descriptor.js +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/function-property-descriptor.js @@ -8,8 +8,10 @@ author: Jordan Harband includes: [propertyHelper.js] ---*/ -verifyNotEnumerable(Object, 'getOwnPropertyDescriptors'); -verifyWritable(Object, 'getOwnPropertyDescriptors'); -verifyConfigurable(Object, 'getOwnPropertyDescriptors'); +verifyProperty(Object, "getOwnPropertyDescriptors", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/not-a-constructor.js index 3d03780e66..1ee9f034de 100644 --- a/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyDescriptors/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.getOwnPropertyDescriptors({}); -}, '`new Object.getOwnPropertyDescriptors({})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyNames/name.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyNames/name.js index 9ed3603700..1952cd6272 100644 --- a/js/src/tests/test262/built-ins/Object/getOwnPropertyNames/name.js +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyNames/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.getOwnPropertyNames.name, "getOwnPropertyNames"); - -verifyNotEnumerable(Object.getOwnPropertyNames, "name"); -verifyNotWritable(Object.getOwnPropertyNames, "name"); -verifyConfigurable(Object.getOwnPropertyNames, "name"); +verifyProperty(Object.getOwnPropertyNames, "name", { + value: "getOwnPropertyNames", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertyNames/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/getOwnPropertyNames/not-a-constructor.js index 70a205d5a4..7a7cc7ffb3 100644 --- a/js/src/tests/test262/built-ins/Object/getOwnPropertyNames/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertyNames/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.getOwnPropertyNames({}); -}, '`new Object.getOwnPropertyNames({})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertySymbols/length.js b/js/src/tests/test262/built-ins/Object/getOwnPropertySymbols/length.js index 6807e1d8dc..feb50325ca 100644 --- a/js/src/tests/test262/built-ins/Object/getOwnPropertySymbols/length.js +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertySymbols/length.js @@ -22,10 +22,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.getOwnPropertySymbols.length, 1); - -verifyNotEnumerable(Object.getOwnPropertySymbols, "length"); -verifyNotWritable(Object.getOwnPropertySymbols, "length"); -verifyConfigurable(Object.getOwnPropertySymbols, "length"); +verifyProperty(Object.getOwnPropertySymbols, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertySymbols/name.js b/js/src/tests/test262/built-ins/Object/getOwnPropertySymbols/name.js index 0199dbba7d..811508fbe5 100644 --- a/js/src/tests/test262/built-ins/Object/getOwnPropertySymbols/name.js +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertySymbols/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.getOwnPropertySymbols.name, "getOwnPropertySymbols"); - -verifyNotEnumerable(Object.getOwnPropertySymbols, "name"); -verifyNotWritable(Object.getOwnPropertySymbols, "name"); -verifyConfigurable(Object.getOwnPropertySymbols, "name"); +verifyProperty(Object.getOwnPropertySymbols, "name", { + value: "getOwnPropertySymbols", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getOwnPropertySymbols/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/getOwnPropertySymbols/not-a-constructor.js index c9a4d86680..1c9a660888 100644 --- a/js/src/tests/test262/built-ins/Object/getOwnPropertySymbols/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/getOwnPropertySymbols/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.getOwnPropertySymbols({}); -}, '`new Object.getOwnPropertySymbols({})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getPrototypeOf/name.js b/js/src/tests/test262/built-ins/Object/getPrototypeOf/name.js index ad6ed3dfd7..5760387715 100644 --- a/js/src/tests/test262/built-ins/Object/getPrototypeOf/name.js +++ b/js/src/tests/test262/built-ins/Object/getPrototypeOf/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.getPrototypeOf.name, "getPrototypeOf"); - -verifyNotEnumerable(Object.getPrototypeOf, "name"); -verifyNotWritable(Object.getPrototypeOf, "name"); -verifyConfigurable(Object.getPrototypeOf, "name"); +verifyProperty(Object.getPrototypeOf, "name", { + value: "getPrototypeOf", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/getPrototypeOf/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/getPrototypeOf/not-a-constructor.js index a40dd4beca..9bf94e49a5 100644 --- a/js/src/tests/test262/built-ins/Object/getPrototypeOf/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/getPrototypeOf/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.getPrototypeOf({}); -}, '`new Object.getPrototypeOf({})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/groupBy/string.js b/js/src/tests/test262/built-ins/Object/groupBy/string.js new file mode 100644 index 0000000000..6e34359f6d --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/groupBy/string.js @@ -0,0 +1,24 @@ +// Copyright (c) 2023 Ecma International. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-object.groupby +description: Object.groupBy works for string items +info: | + Object.groupBy ( items, callbackfn ) + ... +includes: [compareArray.js] +features: [array-grouping] +---*/ + +const string = '🥰💩🙏😈'; + +const obj = Object.groupBy(string, function (char) { + return char < '🙏' ? 'before' : 'after'; +}); + +assert.compareArray(Object.keys(obj), ['after', 'before']); +assert.compareArray(obj.before, ['💩', '😈']); +assert.compareArray(obj.after, ['🥰', '🙏']); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/hasOwn/descriptor.js b/js/src/tests/test262/built-ins/Object/hasOwn/descriptor.js index 105e9eaa10..88feeea09a 100644 --- a/js/src/tests/test262/built-ins/Object/hasOwn/descriptor.js +++ b/js/src/tests/test262/built-ins/Object/hasOwn/descriptor.js @@ -9,8 +9,10 @@ author: Jamie Kyle features: [Object.hasOwn] ---*/ -verifyWritable(Object, "hasOwn"); -verifyNotEnumerable(Object, "hasOwn"); -verifyConfigurable(Object, "hasOwn"); +verifyProperty(Object, "hasOwn", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/hasOwn/name.js b/js/src/tests/test262/built-ins/Object/hasOwn/name.js index c8532bc559..c421cc6b2b 100644 --- a/js/src/tests/test262/built-ins/Object/hasOwn/name.js +++ b/js/src/tests/test262/built-ins/Object/hasOwn/name.js @@ -21,10 +21,11 @@ author: Jamie Kyle features: [Object.hasOwn] ---*/ -assert.sameValue(Object.hasOwn.name, "hasOwn"); - -verifyNotEnumerable(Object.hasOwn, "name"); -verifyNotWritable(Object.hasOwn, "name"); -verifyConfigurable(Object.hasOwn, "name"); +verifyProperty(Object.hasOwn, "name", { + value: "hasOwn", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/hasOwn/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/hasOwn/not-a-constructor.js index a3badb6c87..a5baf6b30d 100644 --- a/js/src/tests/test262/built-ins/Object/hasOwn/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/hasOwn/not-a-constructor.js @@ -30,6 +30,6 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.hasOwn(''); -}, '`new Object.hasOwn(\'\')` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/is/length.js b/js/src/tests/test262/built-ins/Object/is/length.js index 98483984b9..9218a31356 100644 --- a/js/src/tests/test262/built-ins/Object/is/length.js +++ b/js/src/tests/test262/built-ins/Object/is/length.js @@ -10,10 +10,11 @@ description: > includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.is.length, 2, "The value of `Object.is.length` is `2`"); - -verifyNotEnumerable(Object.is, "length"); -verifyNotWritable(Object.is, "length"); -verifyConfigurable(Object.is, "length"); +verifyProperty(Object.is, "length", { + value: 2, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/is/name.js b/js/src/tests/test262/built-ins/Object/is/name.js index f495ccbc12..d614d88d0a 100644 --- a/js/src/tests/test262/built-ins/Object/is/name.js +++ b/js/src/tests/test262/built-ins/Object/is/name.js @@ -10,10 +10,11 @@ description: > includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.is.name, 'is', "The value of `Object.is.name` is `'is'`"); - -verifyNotEnumerable(Object.is, "name"); -verifyNotWritable(Object.is, "name"); -verifyConfigurable(Object.is, "name"); +verifyProperty(Object.is, "name", { + value: "is", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/is/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/is/not-a-constructor.js index 96c90fcc5d..b56849e5f1 100644 --- a/js/src/tests/test262/built-ins/Object/is/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/is/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Object.is), false, 'isConstructor(Object.is) must assert.throws(TypeError, () => { new Object.is(0, 0); -}, '`new Object.is(0, 0)` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/is/object-is.js b/js/src/tests/test262/built-ins/Object/is/object-is.js index 22dcd083aa..0865fb21ad 100644 --- a/js/src/tests/test262/built-ins/Object/is/object-is.js +++ b/js/src/tests/test262/built-ins/Object/is/object-is.js @@ -10,12 +10,12 @@ description: > includes: [propertyHelper.js] ---*/ - assert.sameValue(typeof Object.is, "function"); -assert.sameValue(Object.is.name, "is"); -verifyWritable(Object, "is"); -verifyNotEnumerable(Object, "is"); -verifyConfigurable(Object, "is"); +verifyProperty(Object, "is", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/isExtensible/name.js b/js/src/tests/test262/built-ins/Object/isExtensible/name.js index ae6a6e6549..eff74b07fa 100644 --- a/js/src/tests/test262/built-ins/Object/isExtensible/name.js +++ b/js/src/tests/test262/built-ins/Object/isExtensible/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.isExtensible.name, "isExtensible"); - -verifyNotEnumerable(Object.isExtensible, "name"); -verifyNotWritable(Object.isExtensible, "name"); -verifyConfigurable(Object.isExtensible, "name"); +verifyProperty(Object.isExtensible, "name", { + value: "isExtensible", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/isExtensible/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/isExtensible/not-a-constructor.js index 56ab6d19e3..b314e5250c 100644 --- a/js/src/tests/test262/built-ins/Object/isExtensible/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/isExtensible/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Object.isExtensible), false, 'isConstructor(Objec assert.throws(TypeError, () => { new Object.isExtensible({}); -}, '`new Object.isExtensible({})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/isFrozen/name.js b/js/src/tests/test262/built-ins/Object/isFrozen/name.js index 4b83c75722..d769d8939d 100644 --- a/js/src/tests/test262/built-ins/Object/isFrozen/name.js +++ b/js/src/tests/test262/built-ins/Object/isFrozen/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.isFrozen.name, "isFrozen"); - -verifyNotEnumerable(Object.isFrozen, "name"); -verifyNotWritable(Object.isFrozen, "name"); -verifyConfigurable(Object.isFrozen, "name"); +verifyProperty(Object.isFrozen, "name", { + value: "isFrozen", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/isFrozen/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/isFrozen/not-a-constructor.js index 5f8014985b..cc42d1d9e8 100644 --- a/js/src/tests/test262/built-ins/Object/isFrozen/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/isFrozen/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Object.isFrozen), false, 'isConstructor(Object.is assert.throws(TypeError, () => { new Object.isFrozen({}); -}, '`new Object.isFrozen({})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/isSealed/name.js b/js/src/tests/test262/built-ins/Object/isSealed/name.js index c11f5b4842..54620f96f1 100644 --- a/js/src/tests/test262/built-ins/Object/isSealed/name.js +++ b/js/src/tests/test262/built-ins/Object/isSealed/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.isSealed.name, "isSealed"); - -verifyNotEnumerable(Object.isSealed, "name"); -verifyNotWritable(Object.isSealed, "name"); -verifyConfigurable(Object.isSealed, "name"); +verifyProperty(Object.isSealed, "name", { + value: "isSealed", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/isSealed/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/isSealed/not-a-constructor.js index a02bf5f415..ed39336fd1 100644 --- a/js/src/tests/test262/built-ins/Object/isSealed/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/isSealed/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Object.isSealed), false, 'isConstructor(Object.is assert.throws(TypeError, () => { new Object.isSealed({}); -}, '`new Object.isSealed({})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/keys/name.js b/js/src/tests/test262/built-ins/Object/keys/name.js index 4839cf4031..413d847fc8 100644 --- a/js/src/tests/test262/built-ins/Object/keys/name.js +++ b/js/src/tests/test262/built-ins/Object/keys/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.keys.name, "keys"); - -verifyNotEnumerable(Object.keys, "name"); -verifyNotWritable(Object.keys, "name"); -verifyConfigurable(Object.keys, "name"); +verifyProperty(Object.keys, "name", { + value: "keys", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/keys/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/keys/not-a-constructor.js index dc5c3083f2..4dbfa236f6 100644 --- a/js/src/tests/test262/built-ins/Object/keys/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/keys/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Object.keys), false, 'isConstructor(Object.keys) assert.throws(TypeError, () => { new Object.keys({}); -}, '`new Object.keys({})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/preventExtensions/name.js b/js/src/tests/test262/built-ins/Object/preventExtensions/name.js index 09e9f7130d..b42ad2df39 100644 --- a/js/src/tests/test262/built-ins/Object/preventExtensions/name.js +++ b/js/src/tests/test262/built-ins/Object/preventExtensions/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.preventExtensions.name, "preventExtensions"); - -verifyNotEnumerable(Object.preventExtensions, "name"); -verifyNotWritable(Object.preventExtensions, "name"); -verifyConfigurable(Object.preventExtensions, "name"); +verifyProperty(Object.preventExtensions, "name", { + value: "preventExtensions", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/preventExtensions/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/preventExtensions/not-a-constructor.js index dac8c6ee18..1b8b5fb864 100644 --- a/js/src/tests/test262/built-ins/Object/preventExtensions/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/preventExtensions/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.preventExtensions({}); -}, '`new Object.preventExtensions({})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/prop-desc.js b/js/src/tests/test262/built-ins/Object/prop-desc.js index 64e7a8969a..512b652cbb 100644 --- a/js/src/tests/test262/built-ins/Object/prop-desc.js +++ b/js/src/tests/test262/built-ins/Object/prop-desc.js @@ -11,8 +11,10 @@ info: | includes: [propertyHelper.js] ---*/ -verifyNotEnumerable(this, "Object"); -verifyWritable(this, "Object"); -verifyConfigurable(this, "Object"); +verifyProperty(this, "Object", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/prototype/hasOwnProperty/name.js b/js/src/tests/test262/built-ins/Object/prototype/hasOwnProperty/name.js index ae01259e26..35d0280902 100644 --- a/js/src/tests/test262/built-ins/Object/prototype/hasOwnProperty/name.js +++ b/js/src/tests/test262/built-ins/Object/prototype/hasOwnProperty/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.prototype.hasOwnProperty.name, "hasOwnProperty"); - -verifyNotEnumerable(Object.prototype.hasOwnProperty, "name"); -verifyNotWritable(Object.prototype.hasOwnProperty, "name"); -verifyConfigurable(Object.prototype.hasOwnProperty, "name"); +verifyProperty(Object.prototype.hasOwnProperty, "name", { + value: "hasOwnProperty", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/prototype/hasOwnProperty/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/prototype/hasOwnProperty/not-a-constructor.js index 07d38e779c..33f4aca473 100644 --- a/js/src/tests/test262/built-ins/Object/prototype/hasOwnProperty/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/prototype/hasOwnProperty/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.prototype.hasOwnProperty(''); -}, '`new Object.prototype.hasOwnProperty(\'\')` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/prototype/isPrototypeOf/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/prototype/isPrototypeOf/not-a-constructor.js index 9de714cba9..e8324db0be 100644 --- a/js/src/tests/test262/built-ins/Object/prototype/isPrototypeOf/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/prototype/isPrototypeOf/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.prototype.isPrototypeOf({}); -}, '`new Object.prototype.isPrototypeOf({})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/prototype/propertyIsEnumerable/name.js b/js/src/tests/test262/built-ins/Object/prototype/propertyIsEnumerable/name.js index 9054d1f7a5..b6638e42e3 100644 --- a/js/src/tests/test262/built-ins/Object/prototype/propertyIsEnumerable/name.js +++ b/js/src/tests/test262/built-ins/Object/prototype/propertyIsEnumerable/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.prototype.propertyIsEnumerable.name, "propertyIsEnumerable"); - -verifyNotEnumerable(Object.prototype.propertyIsEnumerable, "name"); -verifyNotWritable(Object.prototype.propertyIsEnumerable, "name"); -verifyConfigurable(Object.prototype.propertyIsEnumerable, "name"); +verifyProperty(Object.prototype.propertyIsEnumerable, "name", { + value: "propertyIsEnumerable", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/prototype/propertyIsEnumerable/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/prototype/propertyIsEnumerable/not-a-constructor.js index e8bdaf469e..71cb963283 100644 --- a/js/src/tests/test262/built-ins/Object/prototype/propertyIsEnumerable/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/prototype/propertyIsEnumerable/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.prototype.propertyIsEnumerable(''); -}, '`new Object.prototype.propertyIsEnumerable(\'\')` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/prototype/toLocaleString/name.js b/js/src/tests/test262/built-ins/Object/prototype/toLocaleString/name.js index 5f258165ba..835f5a488b 100644 --- a/js/src/tests/test262/built-ins/Object/prototype/toLocaleString/name.js +++ b/js/src/tests/test262/built-ins/Object/prototype/toLocaleString/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.prototype.toLocaleString.name, "toLocaleString"); - -verifyNotEnumerable(Object.prototype.toLocaleString, "name"); -verifyNotWritable(Object.prototype.toLocaleString, "name"); -verifyConfigurable(Object.prototype.toLocaleString, "name"); +verifyProperty(Object.prototype.toLocaleString, "name", { + value: "toLocaleString", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/prototype/toLocaleString/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/prototype/toLocaleString/not-a-constructor.js index 49fc0525db..ed9b6d87dc 100644 --- a/js/src/tests/test262/built-ins/Object/prototype/toLocaleString/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/prototype/toLocaleString/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.prototype.toLocaleString(''); -}, '`new Object.prototype.toLocaleString(\'\')` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/prototype/toString/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/prototype/toString/not-a-constructor.js index 54f974d24f..ca2f1b3d64 100644 --- a/js/src/tests/test262/built-ins/Object/prototype/toString/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/prototype/toString/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.prototype.toString(); -}, '`new Object.prototype.toString()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/prototype/toString/prop-desc.js b/js/src/tests/test262/built-ins/Object/prototype/toString/prop-desc.js index 7d3ac0d66b..6ce7d132aa 100644 --- a/js/src/tests/test262/built-ins/Object/prototype/toString/prop-desc.js +++ b/js/src/tests/test262/built-ins/Object/prototype/toString/prop-desc.js @@ -16,8 +16,10 @@ info: | includes: [propertyHelper.js] ---*/ -verifyWritable(Object.prototype, "toString"); -verifyNotEnumerable(Object.prototype, "toString"); -verifyConfigurable(Object.prototype, "toString"); +verifyProperty(Object.prototype, "toString", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/prototype/valueOf/name.js b/js/src/tests/test262/built-ins/Object/prototype/valueOf/name.js index 7648b4002d..08140e27d9 100644 --- a/js/src/tests/test262/built-ins/Object/prototype/valueOf/name.js +++ b/js/src/tests/test262/built-ins/Object/prototype/valueOf/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.prototype.valueOf.name, "valueOf"); - -verifyNotEnumerable(Object.prototype.valueOf, "name"); -verifyNotWritable(Object.prototype.valueOf, "name"); -verifyConfigurable(Object.prototype.valueOf, "name"); +verifyProperty(Object.prototype.valueOf, "name", { + value: "valueOf", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/prototype/valueOf/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/prototype/valueOf/not-a-constructor.js index 6db8b1c516..1aaca96dc8 100644 --- a/js/src/tests/test262/built-ins/Object/prototype/valueOf/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/prototype/valueOf/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.prototype.valueOf(); -}, '`new Object.prototype.valueOf()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/configurable-attribute-all-own-properties-set-from-true-to-false-property-are-unaltered.js b/js/src/tests/test262/built-ins/Object/seal/configurable-attribute-all-own-properties-set-from-true-to-false-property-are-unaltered.js index 4b337ca128..2d8f782d8d 100644 --- a/js/src/tests/test262/built-ins/Object/seal/configurable-attribute-all-own-properties-set-from-true-to-false-property-are-unaltered.js +++ b/js/src/tests/test262/built-ins/Object/seal/configurable-attribute-all-own-properties-set-from-true-to-false-property-are-unaltered.js @@ -40,21 +40,20 @@ if (!preCheck) { throw new Test262Error('Expected preCheck to be true, actually ' + preCheck); } - -verifyEqualTo(obj, "foo1", 10); - -verifyWritable(obj, "foo1"); - -verifyEnumerable(obj, "foo1"); - -verifyNotConfigurable(obj, "foo1"); +verifyProperty(obj, "foo1", { + value: 10, + writable: true, + enumerable: true, + configurable: false, +}); verifyEqualTo(obj, "foo2", get_func()); verifyWritable(obj, "foo2", "variableForHelpVerify"); -verifyEnumerable(obj, "foo2"); - -verifyNotConfigurable(obj, "foo2"); +verifyProperty(obj, "foo2", { + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/configurable-attribute-own-accessor-property-set-from-true-to-false-property-are-unaltered.js b/js/src/tests/test262/built-ins/Object/seal/configurable-attribute-own-accessor-property-set-from-true-to-false-property-are-unaltered.js index 5c28cf68a4..fa49cab540 100644 --- a/js/src/tests/test262/built-ins/Object/seal/configurable-attribute-own-accessor-property-set-from-true-to-false-property-are-unaltered.js +++ b/js/src/tests/test262/built-ins/Object/seal/configurable-attribute-own-accessor-property-set-from-true-to-false-property-are-unaltered.js @@ -37,8 +37,9 @@ verifyEqualTo(obj, "foo", getFunc()); verifyWritable(obj, "foo", "variableForHelpVerify"); -verifyEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/length.js b/js/src/tests/test262/built-ins/Object/seal/length.js index 114de5fd88..515d284d28 100644 --- a/js/src/tests/test262/built-ins/Object/seal/length.js +++ b/js/src/tests/test262/built-ins/Object/seal/length.js @@ -14,10 +14,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.seal.length, 1); - -verifyNotEnumerable(Object.seal, "length"); -verifyNotWritable(Object.seal, "length"); -verifyConfigurable(Object.seal, "length"); +verifyProperty(Object.seal, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/name.js b/js/src/tests/test262/built-ins/Object/seal/name.js index 3b7047d2c1..eb76408886 100644 --- a/js/src/tests/test262/built-ins/Object/seal/name.js +++ b/js/src/tests/test262/built-ins/Object/seal/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.seal.name, "seal"); - -verifyNotEnumerable(Object.seal, "name"); -verifyNotWritable(Object.seal, "name"); -verifyConfigurable(Object.seal, "name"); +verifyProperty(Object.seal, "name", { + value: "seal", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/seal/not-a-constructor.js index 97ade868fe..8ea819dbd5 100644 --- a/js/src/tests/test262/built-ins/Object/seal/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/seal/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Object.seal), false, 'isConstructor(Object.seal) assert.throws(TypeError, () => { new Object.seal(); -}, '`new Object.seal()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-all-own-properties-of-o-are-already-non-configurable.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-all-own-properties-of-o-are-already-non-configurable.js index 563b4d318e..65276afb2b 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-all-own-properties-of-o-are-already-non-configurable.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-all-own-properties-of-o-are-already-non-configurable.js @@ -43,19 +43,20 @@ if (Object.isExtensible(obj)) { throw new Test262Error('Expected obj NOT to be extensible, actually ' + Object.isExtensible(obj)); } -verifyEqualTo(obj, "foo1", 10); - -verifyWritable(obj, "foo1"); - -verifyEnumerable(obj, "foo1"); +verifyProperty(obj, "foo1", { + value: 10, + writable: true, + enumerable: true, + configurable: false, +}); -verifyNotConfigurable(obj, "foo1"); verifyEqualTo(obj, "foo2", get_func()); verifyWritable(obj, "foo2", "variableForHelpVerify"); -verifyEnumerable(obj, "foo2"); - -verifyNotConfigurable(obj, "foo2"); +verifyProperty(obj, "foo2", { + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js index 0d59c51bca..3ab85abfc6 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-configurable-attribute-of-own-data-property-of-o-is-set-from-true-to-false-and-other-attributes-of-the-property-are-unaltered.js @@ -25,12 +25,11 @@ if (!preCheck) { throw new Test262Error('Expected preCheck to be true, actually ' + preCheck); } -verifyEqualTo(obj, "foo", 10); - -verifyWritable(obj, "foo"); - -verifyEnumerable(obj, "foo"); - -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + value: 10, + writable: true, + enumerable: true, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-non-enumerable-own-property-of-o-is-sealed.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-non-enumerable-own-property-of-o-is-sealed.js index 02501ec379..ef2a857c7a 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-non-enumerable-own-property-of-o-is-sealed.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-non-enumerable-own-property-of-o-is-sealed.js @@ -18,7 +18,8 @@ Object.defineProperty(obj, "foo", { assert(Object.isExtensible(obj)); Object.seal(obj); -assert(obj.hasOwnProperty("foo")); -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-accessor-property-that-overrides-an-inherited-accessor-property.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-accessor-property-that-overrides-an-inherited-accessor-property.js index 7f5c68979e..7aea052abe 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-accessor-property-that-overrides-an-inherited-accessor-property.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-accessor-property-that-overrides-an-inherited-accessor-property.js @@ -33,7 +33,10 @@ Object.defineProperty(obj, "foo", { assert(Object.isExtensible(obj)); Object.seal(obj); -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + configurable: false, +}); + assert.sameValue(obj.foo, 10); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-accessor-property-that-overrides-an-inherited-data-property.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-accessor-property-that-overrides-an-inherited-data-property.js index e3a3707431..f155e7975f 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-accessor-property-that-overrides-an-inherited-data-property.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-accessor-property-that-overrides-an-inherited-data-property.js @@ -31,7 +31,10 @@ Object.defineProperty(obj, "foo", { assert(Object.isExtensible(obj)); Object.seal(obj); -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + configurable: false, +}); + assert.sameValue(obj.foo, 10); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-accessor-property.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-accessor-property.js index 3704d492ba..43b4e402d1 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-accessor-property.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-accessor-property.js @@ -19,7 +19,10 @@ Object.defineProperty(obj, "foo", { assert(Object.isExtensible(obj)); Object.seal(obj); -verifyNotConfigurable(obj, "foo"); +verifyProperty(obj, "foo", { + configurable: false, +}); + assert.sameValue(obj.foo, 10); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-data-property-that-overrides-an-inherited-accessor-property.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-data-property-that-overrides-an-inherited-accessor-property.js index e146af8558..32125f67c4 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-data-property-that-overrides-an-inherited-accessor-property.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-data-property-that-overrides-an-inherited-accessor-property.js @@ -30,7 +30,9 @@ Object.defineProperty(obj, "foo", { assert(Object.isExtensible(obj)); Object.seal(obj); -verifyNotConfigurable(obj, "foo"); -assert.sameValue(obj.foo, 10); +verifyProperty(obj, "foo", { + value: 10, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-data-property-that-overrides-an-inherited-data-property.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-data-property-that-overrides-an-inherited-data-property.js index e62e3fb902..10127134e7 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-data-property-that-overrides-an-inherited-data-property.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-data-property-that-overrides-an-inherited-data-property.js @@ -25,7 +25,9 @@ Object.defineProperty(obj, "foo", { assert(Object.isExtensible(obj)); Object.seal(obj); -verifyNotConfigurable(obj, "foo"); -assert.sameValue(obj.foo, 10); +verifyProperty(obj, "foo", { + value: 10, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-data-property.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-data-property.js index d19e947979..953710ace7 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-data-property.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-data-property.js @@ -14,7 +14,9 @@ obj.foo = 10; // default [[Configurable]] attribute value of foo: true assert(Object.isExtensible(obj)); Object.seal(obj); -verifyNotConfigurable(obj, "foo"); -assert.sameValue(obj.foo, 10); +verifyProperty(obj, "foo", { + value: 10, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-boolean-object-that-uses-object-s-get-own-property.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-boolean-object-that-uses-object-s-get-own-property.js index 20d4898020..5a2c970b25 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-boolean-object-that-uses-object-s-get-own-property.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-boolean-object-that-uses-object-s-get-own-property.js @@ -16,7 +16,9 @@ obj.foo = 10; assert(Object.isExtensible(obj)); Object.seal(obj); -verifyNotConfigurable(obj, "foo"); -assert.sameValue(obj.foo, 10); +verifyProperty(obj, "foo", { + value: 10, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-date-object-that-uses-object-s-get-own-property.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-date-object-that-uses-object-s-get-own-property.js index 2517e70bc0..77a161b71e 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-date-object-that-uses-object-s-get-own-property.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-date-object-that-uses-object-s-get-own-property.js @@ -16,7 +16,9 @@ obj.foo = 10; assert(Object.isExtensible(obj)); Object.seal(obj); -verifyNotConfigurable(obj, "foo"); -assert.sameValue(obj.foo, 10); +verifyProperty(obj, "foo", { + value: 10, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-function-object-that-uses-object-s-get-own-property.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-function-object-that-uses-object-s-get-own-property.js index 18c786075d..db8ba4f6d3 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-function-object-that-uses-object-s-get-own-property.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-function-object-that-uses-object-s-get-own-property.js @@ -16,7 +16,9 @@ obj.foo = 10; assert(Object.isExtensible(obj)); Object.seal(obj); -verifyNotConfigurable(obj, "foo"); -assert.sameValue(obj.foo, 10); +verifyProperty(obj, "foo", { + value: 10, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-number-object-that-uses-object-s-get-own-property.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-number-object-that-uses-object-s-get-own-property.js index 9db2104ff6..d577097702 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-number-object-that-uses-object-s-get-own-property.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-number-object-that-uses-object-s-get-own-property.js @@ -16,7 +16,9 @@ obj.foo = 10; assert(Object.isExtensible(obj)); Object.seal(obj); -verifyNotConfigurable(obj, "foo"); -assert.sameValue(obj.foo, 10); +verifyProperty(obj, "foo", { + value: 10, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-reg-exp-object-that-uses-object-s-get-own-property.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-reg-exp-object-that-uses-object-s-get-own-property.js index 839ce7dd37..7fefac239a 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-reg-exp-object-that-uses-object-s-get-own-property.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-reg-exp-object-that-uses-object-s-get-own-property.js @@ -16,7 +16,9 @@ obj.foo = 10; assert(Object.isExtensible(obj)); Object.seal(obj); -verifyNotConfigurable(obj, "foo"); -assert.sameValue(obj.foo, 10); +verifyProperty(obj, "foo", { + value: 10, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-string-object-which-implements-its-own-get-own-property.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-string-object-which-implements-its-own-get-own-property.js index 7561754fd0..a3badbcd63 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-string-object-which-implements-its-own-get-own-property.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-a-string-object-which-implements-its-own-get-own-property.js @@ -16,7 +16,9 @@ obj.foo = 10; assert(Object.isExtensible(obj)); Object.seal(obj); -verifyNotConfigurable(obj, "foo"); -assert.sameValue(obj.foo, 10); +verifyProperty(obj, "foo", { + value: 10, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-an-arguments-object-which-implements-its-own-get-own-property.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-an-arguments-object-which-implements-its-own-get-own-property.js index 39853c155f..0b9a0ddc9c 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-an-arguments-object-which-implements-its-own-get-own-property.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-an-arguments-object-which-implements-its-own-get-own-property.js @@ -18,7 +18,9 @@ obj.foo = 10; assert(Object.isExtensible(obj)); Object.seal(obj); -verifyNotConfigurable(obj, "foo"); -assert.sameValue(obj.foo, 10); +verifyProperty(obj, "foo", { + value: 10, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-an-array-object-that-uses-object-s-get-own-property.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-an-array-object-that-uses-object-s-get-own-property.js index 26e19643df..8c7c2fd0fb 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-an-array-object-that-uses-object-s-get-own-property.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-an-array-object-that-uses-object-s-get-own-property.js @@ -16,7 +16,9 @@ obj.foo = 10; assert(Object.isExtensible(obj)); Object.seal(obj); -verifyNotConfigurable(obj, "foo"); -assert.sameValue(obj.foo, 10); +verifyProperty(obj, "foo", { + value: 10, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-an-error-object-that-uses-object-s-get-own-property.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-an-error-object-that-uses-object-s-get-own-property.js index 045b2c0248..7989899aa8 100644 --- a/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-an-error-object-that-uses-object-s-get-own-property.js +++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-p-is-own-property-of-an-error-object-that-uses-object-s-get-own-property.js @@ -16,7 +16,9 @@ obj.foo = 10; assert(Object.isExtensible(obj)); Object.seal(obj); -verifyNotConfigurable(obj, "foo"); -assert.sameValue(obj.foo, 10); +verifyProperty(obj, "foo", { + value: 10, + configurable: false, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/setPrototypeOf/length.js b/js/src/tests/test262/built-ins/Object/setPrototypeOf/length.js index f2f8d611b9..7640d3f587 100644 --- a/js/src/tests/test262/built-ins/Object/setPrototypeOf/length.js +++ b/js/src/tests/test262/built-ins/Object/setPrototypeOf/length.js @@ -18,14 +18,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue( - Object.setPrototypeOf.length, - 2, - 'The value of `Object.setPrototypeOf.length` is `2`' -); - -verifyNotEnumerable(Object.setPrototypeOf, 'length'); -verifyNotWritable(Object.setPrototypeOf, 'length'); -verifyConfigurable(Object.setPrototypeOf, 'length'); +verifyProperty(Object.setPrototypeOf, "length", { + value: 2, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/setPrototypeOf/name.js b/js/src/tests/test262/built-ins/Object/setPrototypeOf/name.js index 1c9ab55a58..e5a46daee0 100644 --- a/js/src/tests/test262/built-ins/Object/setPrototypeOf/name.js +++ b/js/src/tests/test262/built-ins/Object/setPrototypeOf/name.js @@ -19,14 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue( - Object.setPrototypeOf.name, - 'setPrototypeOf', - 'The value of `Object.setPrototypeOf.name` is `"setPrototypeOf"`' -); - -verifyNotEnumerable(Object.setPrototypeOf, 'name'); -verifyNotWritable(Object.setPrototypeOf, 'name'); -verifyConfigurable(Object.setPrototypeOf, 'name'); +verifyProperty(Object.setPrototypeOf, "name", { + value: "setPrototypeOf", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/setPrototypeOf/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/setPrototypeOf/not-a-constructor.js index 625f438f4a..da7d13cba6 100644 --- a/js/src/tests/test262/built-ins/Object/setPrototypeOf/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/setPrototypeOf/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Object.setPrototypeOf({}, {}); -}, '`new Object.setPrototypeOf({}, {})` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/setPrototypeOf/property-descriptor.js b/js/src/tests/test262/built-ins/Object/setPrototypeOf/property-descriptor.js index 946db0ad9c..9c04d4c683 100644 --- a/js/src/tests/test262/built-ins/Object/setPrototypeOf/property-descriptor.js +++ b/js/src/tests/test262/built-ins/Object/setPrototypeOf/property-descriptor.js @@ -12,8 +12,10 @@ includes: [propertyHelper.js] assert.sameValue(typeof Object.setPrototypeOf, 'function'); -verifyNotEnumerable(Object, 'setPrototypeOf'); -verifyWritable(Object, 'setPrototypeOf'); -verifyConfigurable(Object, 'setPrototypeOf'); +verifyProperty(Object, "setPrototypeOf", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/values/function-length.js b/js/src/tests/test262/built-ins/Object/values/function-length.js index bb3ede0e3c..93d6a66639 100644 --- a/js/src/tests/test262/built-ins/Object/values/function-length.js +++ b/js/src/tests/test262/built-ins/Object/values/function-length.js @@ -8,10 +8,11 @@ author: Jordan Harband includes: [propertyHelper.js] ---*/ -assert.sameValue(Object.values.length, 1, 'Expected Object.values.length to be 1'); - -verifyNotEnumerable(Object.values, 'length'); -verifyNotWritable(Object.values, 'length'); -verifyConfigurable(Object.values, 'length'); +verifyProperty(Object.values, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/values/function-name.js b/js/src/tests/test262/built-ins/Object/values/function-name.js index 6535fd2db4..a008546f02 100644 --- a/js/src/tests/test262/built-ins/Object/values/function-name.js +++ b/js/src/tests/test262/built-ins/Object/values/function-name.js @@ -8,14 +8,11 @@ author: Jordan Harband includes: [propertyHelper.js] ---*/ -assert.sameValue( - Object.values.name, - 'values', - 'Expected Object.values.name to be "values"' -); - -verifyNotEnumerable(Object.values, 'name'); -verifyNotWritable(Object.values, 'name'); -verifyConfigurable(Object.values, 'name'); +verifyProperty(Object.values, "name", { + value: "values", + writable: false, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/values/function-property-descriptor.js b/js/src/tests/test262/built-ins/Object/values/function-property-descriptor.js index ebd062c347..fb6a12c5b9 100644 --- a/js/src/tests/test262/built-ins/Object/values/function-property-descriptor.js +++ b/js/src/tests/test262/built-ins/Object/values/function-property-descriptor.js @@ -8,8 +8,10 @@ author: Jordan Harband includes: [propertyHelper.js] ---*/ -verifyNotEnumerable(Object, 'values'); -verifyWritable(Object, 'values'); -verifyConfigurable(Object, 'values'); +verifyProperty(Object, "values", { + writable: true, + enumerable: false, + configurable: true, +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Object/values/not-a-constructor.js b/js/src/tests/test262/built-ins/Object/values/not-a-constructor.js index 632d285a49..5c647f604f 100644 --- a/js/src/tests/test262/built-ins/Object/values/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Object/values/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Object.values), false, 'isConstructor(Object.valu assert.throws(TypeError, () => { new Object.values({}); -}, '`new Object.values({})` throws TypeError'); +}); reportCompare(0, 0); |