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