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