diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Number')
32 files changed, 132 insertions, 112 deletions
diff --git a/js/src/tests/test262/built-ins/Number/isFinite/length.js b/js/src/tests/test262/built-ins/Number/isFinite/length.js index 474fcb877f..f2130d61f8 100644 --- a/js/src/tests/test262/built-ins/Number/isFinite/length.js +++ b/js/src/tests/test262/built-ins/Number/isFinite/length.js @@ -22,10 +22,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.isFinite.length, 1); - -verifyNotEnumerable(Number.isFinite, "length"); -verifyNotWritable(Number.isFinite, "length"); -verifyConfigurable(Number.isFinite, "length"); +verifyProperty(Number.isFinite, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/isFinite/name.js b/js/src/tests/test262/built-ins/Number/isFinite/name.js index 61abe6571a..ce0c2b2e11 100644 --- a/js/src/tests/test262/built-ins/Number/isFinite/name.js +++ b/js/src/tests/test262/built-ins/Number/isFinite/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.isFinite.name, "isFinite"); - -verifyNotEnumerable(Number.isFinite, "name"); -verifyNotWritable(Number.isFinite, "name"); -verifyConfigurable(Number.isFinite, "name"); +verifyProperty(Number.isFinite, "name", { + value: "isFinite", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/isFinite/not-a-constructor.js b/js/src/tests/test262/built-ins/Number/isFinite/not-a-constructor.js index 4e42a62e9b..6a97ffb93d 100644 --- a/js/src/tests/test262/built-ins/Number/isFinite/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Number/isFinite/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Number.isFinite), false, 'isConstructor(Number.is assert.throws(TypeError, () => { new Number.isFinite(); -}, '`new Number.isFinite()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/isInteger/length.js b/js/src/tests/test262/built-ins/Number/isInteger/length.js index 99bd2d168f..216ee2960a 100644 --- a/js/src/tests/test262/built-ins/Number/isInteger/length.js +++ b/js/src/tests/test262/built-ins/Number/isInteger/length.js @@ -22,10 +22,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.isInteger.length, 1); - -verifyNotEnumerable(Number.isInteger, "length"); -verifyNotWritable(Number.isInteger, "length"); -verifyConfigurable(Number.isInteger, "length"); +verifyProperty(Number.isInteger, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/isInteger/name.js b/js/src/tests/test262/built-ins/Number/isInteger/name.js index 224c94dba9..755e55d2eb 100644 --- a/js/src/tests/test262/built-ins/Number/isInteger/name.js +++ b/js/src/tests/test262/built-ins/Number/isInteger/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.isInteger.name, "isInteger"); - -verifyNotEnumerable(Number.isInteger, "name"); -verifyNotWritable(Number.isInteger, "name"); -verifyConfigurable(Number.isInteger, "name"); +verifyProperty(Number.isInteger, "name", { + value: "isInteger", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/isInteger/not-a-constructor.js b/js/src/tests/test262/built-ins/Number/isInteger/not-a-constructor.js index 2dad2e9df7..9c06c58ad3 100644 --- a/js/src/tests/test262/built-ins/Number/isInteger/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Number/isInteger/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Number.isInteger), false, 'isConstructor(Number.i assert.throws(TypeError, () => { new Number.isInteger(); -}, '`new Number.isInteger()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/isNaN/length.js b/js/src/tests/test262/built-ins/Number/isNaN/length.js index 302e20edf9..b196887226 100644 --- a/js/src/tests/test262/built-ins/Number/isNaN/length.js +++ b/js/src/tests/test262/built-ins/Number/isNaN/length.js @@ -22,10 +22,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.isNaN.length, 1); - -verifyNotEnumerable(Number.isNaN, "length"); -verifyNotWritable(Number.isNaN, "length"); -verifyConfigurable(Number.isNaN, "length"); +verifyProperty(Number.isNaN, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/isNaN/name.js b/js/src/tests/test262/built-ins/Number/isNaN/name.js index 4d97acdf97..caeb19ed3c 100644 --- a/js/src/tests/test262/built-ins/Number/isNaN/name.js +++ b/js/src/tests/test262/built-ins/Number/isNaN/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.isNaN.name, "isNaN"); - -verifyNotEnumerable(Number.isNaN, "name"); -verifyNotWritable(Number.isNaN, "name"); -verifyConfigurable(Number.isNaN, "name"); +verifyProperty(Number.isNaN, "name", { + value: "isNaN", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/isNaN/not-a-constructor.js b/js/src/tests/test262/built-ins/Number/isNaN/not-a-constructor.js index 482812547c..abca3f5a2e 100644 --- a/js/src/tests/test262/built-ins/Number/isNaN/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Number/isNaN/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Number.isNaN), false, 'isConstructor(Number.isNaN assert.throws(TypeError, () => { new Number.isNaN(); -}, '`new Number.isNaN()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/isSafeInteger/length.js b/js/src/tests/test262/built-ins/Number/isSafeInteger/length.js index bcc7e6a770..10c28bd884 100644 --- a/js/src/tests/test262/built-ins/Number/isSafeInteger/length.js +++ b/js/src/tests/test262/built-ins/Number/isSafeInteger/length.js @@ -22,10 +22,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.isSafeInteger.length, 1); - -verifyNotEnumerable(Number.isSafeInteger, "length"); -verifyNotWritable(Number.isSafeInteger, "length"); -verifyConfigurable(Number.isSafeInteger, "length"); +verifyProperty(Number.isSafeInteger, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/isSafeInteger/name.js b/js/src/tests/test262/built-ins/Number/isSafeInteger/name.js index 3844d43e13..0e892691df 100644 --- a/js/src/tests/test262/built-ins/Number/isSafeInteger/name.js +++ b/js/src/tests/test262/built-ins/Number/isSafeInteger/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.isSafeInteger.name, "isSafeInteger"); - -verifyNotEnumerable(Number.isSafeInteger, "name"); -verifyNotWritable(Number.isSafeInteger, "name"); -verifyConfigurable(Number.isSafeInteger, "name"); +verifyProperty(Number.isSafeInteger, "name", { + value: "isSafeInteger", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/isSafeInteger/not-a-constructor.js b/js/src/tests/test262/built-ins/Number/isSafeInteger/not-a-constructor.js index dca11c9cd3..d1d73d7d26 100644 --- a/js/src/tests/test262/built-ins/Number/isSafeInteger/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Number/isSafeInteger/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Number.isSafeInteger), false, 'isConstructor(Numb assert.throws(TypeError, () => { new Number.isSafeInteger(); -}, '`new Number.isSafeInteger()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/parseFloat/not-a-constructor.js b/js/src/tests/test262/built-ins/Number/parseFloat/not-a-constructor.js index b660870fa8..e35b21f6f0 100644 --- a/js/src/tests/test262/built-ins/Number/parseFloat/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Number/parseFloat/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Number.parseFloat), false, 'isConstructor(Number. assert.throws(TypeError, () => { new Number.parseFloat(); -}, '`new Number.parseFloat()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/parseInt/not-a-constructor.js b/js/src/tests/test262/built-ins/Number/parseInt/not-a-constructor.js index 871e87adea..105aff520d 100644 --- a/js/src/tests/test262/built-ins/Number/parseInt/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Number/parseInt/not-a-constructor.js @@ -25,7 +25,7 @@ assert.sameValue(isConstructor(Number.parseInt), false, 'isConstructor(Number.pa assert.throws(TypeError, () => { new Number.parseInt(); -}, '`new Number.parseInt()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toExponential/length.js b/js/src/tests/test262/built-ins/Number/prototype/toExponential/length.js index 0c146d1500..2215b836a2 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toExponential/length.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toExponential/length.js @@ -22,10 +22,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.prototype.toExponential.length, 1); - -verifyNotEnumerable(Number.prototype.toExponential, "length"); -verifyNotWritable(Number.prototype.toExponential, "length"); -verifyConfigurable(Number.prototype.toExponential, "length"); +verifyProperty(Number.prototype.toExponential, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toExponential/name.js b/js/src/tests/test262/built-ins/Number/prototype/toExponential/name.js index a92b59ba75..b7ab8380c0 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toExponential/name.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toExponential/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.prototype.toExponential.name, "toExponential"); - -verifyNotEnumerable(Number.prototype.toExponential, "name"); -verifyNotWritable(Number.prototype.toExponential, "name"); -verifyConfigurable(Number.prototype.toExponential, "name"); +verifyProperty(Number.prototype.toExponential, "name", { + value: "toExponential", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toExponential/not-a-constructor.js b/js/src/tests/test262/built-ins/Number/prototype/toExponential/not-a-constructor.js index bbf60fe972..6df8f0e848 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toExponential/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toExponential/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Number.prototype.toExponential(); -}, '`new Number.prototype.toExponential()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toFixed/length.js b/js/src/tests/test262/built-ins/Number/prototype/toFixed/length.js index 241a60ad57..4451f57b62 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toFixed/length.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toFixed/length.js @@ -22,10 +22,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.prototype.toFixed.length, 1); - -verifyNotEnumerable(Number.prototype.toFixed, "length"); -verifyNotWritable(Number.prototype.toFixed, "length"); -verifyConfigurable(Number.prototype.toFixed, "length"); +verifyProperty(Number.prototype.toFixed, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toFixed/name.js b/js/src/tests/test262/built-ins/Number/prototype/toFixed/name.js index 49a7dbd1a5..3037d36cdb 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toFixed/name.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toFixed/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.prototype.toFixed.name, "toFixed"); - -verifyNotEnumerable(Number.prototype.toFixed, "name"); -verifyNotWritable(Number.prototype.toFixed, "name"); -verifyConfigurable(Number.prototype.toFixed, "name"); +verifyProperty(Number.prototype.toFixed, "name", { + value: "toFixed", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toFixed/not-a-constructor.js b/js/src/tests/test262/built-ins/Number/prototype/toFixed/not-a-constructor.js index 639cedbd85..bf196b8639 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toFixed/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toFixed/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Number.prototype.toFixed(); -}, '`new Number.prototype.toFixed()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toLocaleString/length.js b/js/src/tests/test262/built-ins/Number/prototype/toLocaleString/length.js index 0692c33edd..b2cefae1af 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toLocaleString/length.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toLocaleString/length.js @@ -22,10 +22,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.prototype.toLocaleString.length, 0); - -verifyNotEnumerable(Number.prototype.toLocaleString, "length"); -verifyNotWritable(Number.prototype.toLocaleString, "length"); -verifyConfigurable(Number.prototype.toLocaleString, "length"); +verifyProperty(Number.prototype.toLocaleString, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toLocaleString/name.js b/js/src/tests/test262/built-ins/Number/prototype/toLocaleString/name.js index 35f6b9a62b..9f6cfa7f26 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toLocaleString/name.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toLocaleString/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.prototype.toLocaleString.name, "toLocaleString"); - -verifyNotEnumerable(Number.prototype.toLocaleString, "name"); -verifyNotWritable(Number.prototype.toLocaleString, "name"); -verifyConfigurable(Number.prototype.toLocaleString, "name"); +verifyProperty(Number.prototype.toLocaleString, "name", { + value: "toLocaleString", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toLocaleString/not-a-constructor.js b/js/src/tests/test262/built-ins/Number/prototype/toLocaleString/not-a-constructor.js index d694532dcf..51ed09a33c 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toLocaleString/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toLocaleString/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Number.prototype.toLocaleString(); -}, '`new Number.prototype.toLocaleString()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toPrecision/length.js b/js/src/tests/test262/built-ins/Number/prototype/toPrecision/length.js index a5cecd54d3..d0b018aedb 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toPrecision/length.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toPrecision/length.js @@ -22,10 +22,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.prototype.toPrecision.length, 1); - -verifyNotEnumerable(Number.prototype.toPrecision, "length"); -verifyNotWritable(Number.prototype.toPrecision, "length"); -verifyConfigurable(Number.prototype.toPrecision, "length"); +verifyProperty(Number.prototype.toPrecision, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toPrecision/name.js b/js/src/tests/test262/built-ins/Number/prototype/toPrecision/name.js index 946c5ad308..61096abd77 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toPrecision/name.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toPrecision/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.prototype.toPrecision.name, "toPrecision"); - -verifyNotEnumerable(Number.prototype.toPrecision, "name"); -verifyNotWritable(Number.prototype.toPrecision, "name"); -verifyConfigurable(Number.prototype.toPrecision, "name"); +verifyProperty(Number.prototype.toPrecision, "name", { + value: "toPrecision", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toPrecision/not-a-constructor.js b/js/src/tests/test262/built-ins/Number/prototype/toPrecision/not-a-constructor.js index 5424e12b7e..bcb3e378b7 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toPrecision/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toPrecision/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Number.prototype.toPrecision(); -}, '`new Number.prototype.toPrecision()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toString/length.js b/js/src/tests/test262/built-ins/Number/prototype/toString/length.js index 0c57733f13..9d158f0677 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toString/length.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toString/length.js @@ -22,10 +22,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.prototype.toString.length, 1); - -verifyNotEnumerable(Number.prototype.toString, "length"); -verifyNotWritable(Number.prototype.toString, "length"); -verifyConfigurable(Number.prototype.toString, "length"); +verifyProperty(Number.prototype.toString, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toString/name.js b/js/src/tests/test262/built-ins/Number/prototype/toString/name.js index 5072c7993b..2d6a750ca4 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toString/name.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toString/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.prototype.toString.name, "toString"); - -verifyNotEnumerable(Number.prototype.toString, "name"); -verifyNotWritable(Number.prototype.toString, "name"); -verifyConfigurable(Number.prototype.toString, "name"); +verifyProperty(Number.prototype.toString, "name", { + value: "toString", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/toString/not-a-constructor.js b/js/src/tests/test262/built-ins/Number/prototype/toString/not-a-constructor.js index e7f1f2ae77..9e5d5bb81d 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/toString/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Number/prototype/toString/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Number.prototype.toString(); -}, '`new Number.prototype.toString()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/valueOf/length.js b/js/src/tests/test262/built-ins/Number/prototype/valueOf/length.js index 65a31127ff..57f56a4d2e 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/valueOf/length.js +++ b/js/src/tests/test262/built-ins/Number/prototype/valueOf/length.js @@ -22,10 +22,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.prototype.valueOf.length, 0); - -verifyNotEnumerable(Number.prototype.valueOf, "length"); -verifyNotWritable(Number.prototype.valueOf, "length"); -verifyConfigurable(Number.prototype.valueOf, "length"); +verifyProperty(Number.prototype.valueOf, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/valueOf/name.js b/js/src/tests/test262/built-ins/Number/prototype/valueOf/name.js index 8c1830f5fd..83e8a70334 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/valueOf/name.js +++ b/js/src/tests/test262/built-ins/Number/prototype/valueOf/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(Number.prototype.valueOf.name, "valueOf"); - -verifyNotEnumerable(Number.prototype.valueOf, "name"); -verifyNotWritable(Number.prototype.valueOf, "name"); -verifyConfigurable(Number.prototype.valueOf, "name"); +verifyProperty(Number.prototype.valueOf, "name", { + value: "valueOf", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/prototype/valueOf/not-a-constructor.js b/js/src/tests/test262/built-ins/Number/prototype/valueOf/not-a-constructor.js index 5037924ce3..ff11f64c20 100644 --- a/js/src/tests/test262/built-ins/Number/prototype/valueOf/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/Number/prototype/valueOf/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { new Number.prototype.valueOf(); -}, '`new Number.prototype.valueOf()` throws TypeError'); +}); reportCompare(0, 0); |