diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Number/prototype/valueOf')
3 files changed, 13 insertions, 11 deletions
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); |