diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/RegExp/prototype')
31 files changed, 146 insertions, 135 deletions
diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/length.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/length.js index ea84d3ce40..b8c3c34a02 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/length.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/length.js @@ -19,10 +19,11 @@ includes: [propertyHelper.js] features: [Symbol.match] ---*/ -assert.sameValue(RegExp.prototype[Symbol.match].length, 1); - -verifyNotEnumerable(RegExp.prototype[Symbol.match], 'length'); -verifyNotWritable(RegExp.prototype[Symbol.match], 'length'); -verifyConfigurable(RegExp.prototype[Symbol.match], 'length'); +verifyProperty(RegExp.prototype[Symbol.match], "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/name.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/name.js index 2c676dba2f..a0629a0c73 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/name.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/name.js @@ -17,10 +17,11 @@ includes: [propertyHelper.js] features: [Symbol.match] ---*/ -assert.sameValue(RegExp.prototype[Symbol.match].name, '[Symbol.match]'); - -verifyNotEnumerable(RegExp.prototype[Symbol.match], 'name'); -verifyNotWritable(RegExp.prototype[Symbol.match], 'name'); -verifyConfigurable(RegExp.prototype[Symbol.match], 'name'); +verifyProperty(RegExp.prototype[Symbol.match], "name", { + value: "[Symbol.match]", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/not-a-constructor.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/not-a-constructor.js index f56be3391f..727add9892 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.match/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { let re = new RegExp(''); new re[Symbol.match](); -}, '`let re = new RegExp(\'\'); new re[Symbol.match]()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.matchAll/length.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.matchAll/length.js index ec522ab2f5..70284e43e6 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.matchAll/length.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.matchAll/length.js @@ -23,10 +23,11 @@ includes: [propertyHelper.js] features: [Symbol.matchAll] ---*/ -assert.sameValue(RegExp.prototype[Symbol.matchAll].length, 1); - -verifyNotEnumerable(RegExp.prototype[Symbol.matchAll], 'length'); -verifyNotWritable(RegExp.prototype[Symbol.matchAll], 'length'); -verifyConfigurable(RegExp.prototype[Symbol.matchAll], 'length'); +verifyProperty(RegExp.prototype[Symbol.matchAll], "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.matchAll/name.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.matchAll/name.js index f9a1e9bf87..4ce81b923f 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.matchAll/name.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.matchAll/name.js @@ -21,10 +21,11 @@ includes: [propertyHelper.js] features: [Symbol.matchAll] ---*/ -assert.sameValue(RegExp.prototype[Symbol.matchAll].name, '[Symbol.matchAll]'); - -verifyNotEnumerable(RegExp.prototype[Symbol.matchAll], 'name'); -verifyNotWritable(RegExp.prototype[Symbol.matchAll], 'name'); -verifyConfigurable(RegExp.prototype[Symbol.matchAll], 'name'); +verifyProperty(RegExp.prototype[Symbol.matchAll], "name", { + value: "[Symbol.matchAll]", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.matchAll/not-a-constructor.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.matchAll/not-a-constructor.js index 03009bf3de..956881d1c6 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.matchAll/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.matchAll/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { let re = new RegExp(''); new re[Symbol.matchAll](); -}, '`let re = new RegExp(\'\'); new re[Symbol.matchAll]()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/length.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/length.js index fe89e2265b..7dce30b819 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/length.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/length.js @@ -19,10 +19,11 @@ includes: [propertyHelper.js] features: [Symbol.replace] ---*/ -assert.sameValue(RegExp.prototype[Symbol.replace].length, 2); - -verifyNotEnumerable(RegExp.prototype[Symbol.replace], 'length'); -verifyNotWritable(RegExp.prototype[Symbol.replace], 'length'); -verifyConfigurable(RegExp.prototype[Symbol.replace], 'length'); +verifyProperty(RegExp.prototype[Symbol.replace], "length", { + value: 2, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/name.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/name.js index 5d6dbb13e7..512c11a769 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/name.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/name.js @@ -17,10 +17,11 @@ includes: [propertyHelper.js] features: [Symbol.replace] ---*/ -assert.sameValue(RegExp.prototype[Symbol.replace].name, '[Symbol.replace]'); - -verifyNotEnumerable(RegExp.prototype[Symbol.replace], 'name'); -verifyNotWritable(RegExp.prototype[Symbol.replace], 'name'); -verifyConfigurable(RegExp.prototype[Symbol.replace], 'name'); +verifyProperty(RegExp.prototype[Symbol.replace], "name", { + value: "[Symbol.replace]", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/not-a-constructor.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/not-a-constructor.js index 8fe7bd03bb..07c7a0b7a1 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.replace/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { let re = new RegExp(''); new re[Symbol.replace](); -}, '`let re = new RegExp(\'\'); new re[Symbol.replace]()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.search/length.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.search/length.js index 86a0b3051c..5be85a3bf4 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.search/length.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.search/length.js @@ -20,10 +20,11 @@ features: [Symbol.search] includes: [propertyHelper.js] ---*/ -assert.sameValue(RegExp.prototype[Symbol.search].length, 1); - -verifyNotEnumerable(RegExp.prototype[Symbol.search], 'length'); -verifyNotWritable(RegExp.prototype[Symbol.search], 'length'); -verifyConfigurable(RegExp.prototype[Symbol.search], 'length'); +verifyProperty(RegExp.prototype[Symbol.search], "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.search/name.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.search/name.js index 08a4452f48..4f3861d650 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.search/name.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.search/name.js @@ -17,10 +17,11 @@ features: [Symbol.search] includes: [propertyHelper.js] ---*/ -assert.sameValue(RegExp.prototype[Symbol.search].name, '[Symbol.search]'); - -verifyNotEnumerable(RegExp.prototype[Symbol.search], 'name'); -verifyNotWritable(RegExp.prototype[Symbol.search], 'name'); -verifyConfigurable(RegExp.prototype[Symbol.search], 'name'); +verifyProperty(RegExp.prototype[Symbol.search], "name", { + value: "[Symbol.search]", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.search/not-a-constructor.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.search/not-a-constructor.js index 0403b2e6da..8d13663998 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.search/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.search/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { let re = new RegExp(''); new re[Symbol.search](); -}, '`let re = new RegExp(\'\'); new re[Symbol.search]()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.split/length.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.split/length.js index 546f056ca0..5fe2ff49c4 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.split/length.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.split/length.js @@ -17,10 +17,11 @@ includes: [propertyHelper.js] features: [Symbol.split] ---*/ -assert.sameValue(RegExp.prototype[Symbol.split].length, 2); - -verifyNotEnumerable(RegExp.prototype[Symbol.split], 'length'); -verifyNotWritable(RegExp.prototype[Symbol.split], 'length'); -verifyConfigurable(RegExp.prototype[Symbol.split], 'length'); +verifyProperty(RegExp.prototype[Symbol.split], "length", { + value: 2, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.split/name.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.split/name.js index aac4f253a1..5284f94f57 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.split/name.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.split/name.js @@ -17,10 +17,11 @@ includes: [propertyHelper.js] features: [Symbol.split] ---*/ -assert.sameValue(RegExp.prototype[Symbol.split].name, '[Symbol.split]'); - -verifyNotEnumerable(RegExp.prototype[Symbol.split], 'name'); -verifyNotWritable(RegExp.prototype[Symbol.split], 'name'); -verifyConfigurable(RegExp.prototype[Symbol.split], 'name'); +verifyProperty(RegExp.prototype[Symbol.split], "name", { + value: "[Symbol.split]", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.split/not-a-constructor.js b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.split/not-a-constructor.js index 4623db96ba..88094c421a 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.split/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/Symbol.split/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { let re = new RegExp(''); new re[Symbol.split](); -}, '`let re = new RegExp(\'\'); new re[Symbol.split]()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/exec/name.js b/js/src/tests/test262/built-ins/RegExp/prototype/exec/name.js index 89d0243a20..ef865729a9 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/exec/name.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/exec/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(RegExp.prototype.exec.name, "exec"); - -verifyNotEnumerable(RegExp.prototype.exec, "name"); -verifyNotWritable(RegExp.prototype.exec, "name"); -verifyConfigurable(RegExp.prototype.exec, "name"); +verifyProperty(RegExp.prototype.exec, "name", { + value: "exec", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/exec/not-a-constructor.js b/js/src/tests/test262/built-ins/RegExp/prototype/exec/not-a-constructor.js index c4492952dd..9578cd6777 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/exec/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/exec/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { let re = new RegExp(''); new re.exec(); -}, '`let re = new RegExp(\'\'); new re.exec()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/global/length.js b/js/src/tests/test262/built-ins/RegExp/prototype/global/length.js index d2802441f3..181dc3f2c4 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/global/length.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/global/length.js @@ -24,10 +24,11 @@ includes: [propertyHelper.js] var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "global"); -assert.sameValue(desc.get.length, 0); - -verifyNotEnumerable(desc.get, "length"); -verifyNotWritable(desc.get, "length"); -verifyConfigurable(desc.get, "length"); +verifyProperty(desc.get, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/global/name.js b/js/src/tests/test262/built-ins/RegExp/prototype/global/name.js index ba8ace9def..fb76ce7121 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/global/name.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/global/name.js @@ -14,13 +14,11 @@ includes: [propertyHelper.js] var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'global'); -assert.sameValue( - descriptor.get.name, - 'get global' -); - -verifyNotEnumerable(descriptor.get, 'name'); -verifyNotWritable(descriptor.get, 'name'); -verifyConfigurable(descriptor.get, 'name'); +verifyProperty(descriptor.get, "name", { + value: "get global", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/ignoreCase/length.js b/js/src/tests/test262/built-ins/RegExp/prototype/ignoreCase/length.js index 3707ec5ad1..fcb51bc8d7 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/ignoreCase/length.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/ignoreCase/length.js @@ -24,10 +24,11 @@ includes: [propertyHelper.js] var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "ignoreCase"); -assert.sameValue(desc.get.length, 0); - -verifyNotEnumerable(desc.get, "length"); -verifyNotWritable(desc.get, "length"); -verifyConfigurable(desc.get, "length"); +verifyProperty(desc.get, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/ignoreCase/name.js b/js/src/tests/test262/built-ins/RegExp/prototype/ignoreCase/name.js index 1f3894cbbe..4f7dc92846 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/ignoreCase/name.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/ignoreCase/name.js @@ -14,13 +14,11 @@ includes: [propertyHelper.js] var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'ignoreCase'); -assert.sameValue( - descriptor.get.name, - 'get ignoreCase' -); - -verifyNotEnumerable(descriptor.get, 'name'); -verifyNotWritable(descriptor.get, 'name'); -verifyConfigurable(descriptor.get, 'name'); +verifyProperty(descriptor.get, "name", { + value: "get ignoreCase", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/multiline/length.js b/js/src/tests/test262/built-ins/RegExp/prototype/multiline/length.js index 08105090e0..c79cb88c99 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/multiline/length.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/multiline/length.js @@ -24,10 +24,11 @@ includes: [propertyHelper.js] var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "multiline"); -assert.sameValue(desc.get.length, 0); - -verifyNotEnumerable(desc.get, "length"); -verifyNotWritable(desc.get, "length"); -verifyConfigurable(desc.get, "length"); +verifyProperty(desc.get, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/multiline/name.js b/js/src/tests/test262/built-ins/RegExp/prototype/multiline/name.js index 674dec6f70..3fd0e3bce7 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/multiline/name.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/multiline/name.js @@ -14,13 +14,11 @@ includes: [propertyHelper.js] var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'multiline'); -assert.sameValue( - descriptor.get.name, - 'get multiline' -); - -verifyNotEnumerable(descriptor.get, 'name'); -verifyNotWritable(descriptor.get, 'name'); -verifyConfigurable(descriptor.get, 'name'); +verifyProperty(descriptor.get, "name", { + value: "get multiline", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/sticky/length.js b/js/src/tests/test262/built-ins/RegExp/prototype/sticky/length.js index 220cf0a901..178f62270b 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/sticky/length.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/sticky/length.js @@ -24,10 +24,11 @@ includes: [propertyHelper.js] var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "sticky"); -assert.sameValue(desc.get.length, 0); - -verifyNotEnumerable(desc.get, "length"); -verifyNotWritable(desc.get, "length"); -verifyConfigurable(desc.get, "length"); +verifyProperty(desc.get, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/sticky/name.js b/js/src/tests/test262/built-ins/RegExp/prototype/sticky/name.js index 8fa5b1ac0f..b1c2120e47 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/sticky/name.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/sticky/name.js @@ -14,13 +14,11 @@ includes: [propertyHelper.js] var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'sticky'); -assert.sameValue( - descriptor.get.name, - 'get sticky' -); - -verifyNotEnumerable(descriptor.get, 'name'); -verifyNotWritable(descriptor.get, 'name'); -verifyConfigurable(descriptor.get, 'name'); +verifyProperty(descriptor.get, "name", { + value: "get sticky", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/test/name.js b/js/src/tests/test262/built-ins/RegExp/prototype/test/name.js index 7ee8a9a2e7..dcfb6f1e1a 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/test/name.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/test/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(RegExp.prototype.test.name, "test"); - -verifyNotEnumerable(RegExp.prototype.test, "name"); -verifyNotWritable(RegExp.prototype.test, "name"); -verifyConfigurable(RegExp.prototype.test, "name"); +verifyProperty(RegExp.prototype.test, "name", { + value: "test", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/test/not-a-constructor.js b/js/src/tests/test262/built-ins/RegExp/prototype/test/not-a-constructor.js index ee6ce0aeaf..60422aca55 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/test/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/test/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { let re = new RegExp(''); new re.test(); -}, '`let re = new RegExp(\'\'); new re.test()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/toString/name.js b/js/src/tests/test262/built-ins/RegExp/prototype/toString/name.js index 91fe5a8809..46da2536c2 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/toString/name.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/toString/name.js @@ -19,10 +19,11 @@ info: | includes: [propertyHelper.js] ---*/ -assert.sameValue(RegExp.prototype.toString.name, "toString"); - -verifyNotEnumerable(RegExp.prototype.toString, "name"); -verifyNotWritable(RegExp.prototype.toString, "name"); -verifyConfigurable(RegExp.prototype.toString, "name"); +verifyProperty(RegExp.prototype.toString, "name", { + value: "toString", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/toString/not-a-constructor.js b/js/src/tests/test262/built-ins/RegExp/prototype/toString/not-a-constructor.js index f064aaf64d..76b48034ed 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/toString/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/toString/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { let re = new RegExp(''); new re.toString(); -}, '`let re = new RegExp(\'\'); new re.toString()` throws TypeError'); +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/unicode/length.js b/js/src/tests/test262/built-ins/RegExp/prototype/unicode/length.js index 127e2d0428..c661157d48 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/unicode/length.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/unicode/length.js @@ -21,10 +21,11 @@ includes: [propertyHelper.js] var getter = Object.getOwnPropertyDescriptor(RegExp.prototype, 'unicode').get; -assert.sameValue(getter.length, 0); - -verifyNotEnumerable(getter, 'length'); -verifyNotWritable(getter, 'length'); -verifyConfigurable(getter, 'length'); +verifyProperty(getter, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/unicode/name.js b/js/src/tests/test262/built-ins/RegExp/prototype/unicode/name.js index 1e1858b46d..a152d919b5 100644 --- a/js/src/tests/test262/built-ins/RegExp/prototype/unicode/name.js +++ b/js/src/tests/test262/built-ins/RegExp/prototype/unicode/name.js @@ -28,10 +28,11 @@ includes: [propertyHelper.js] var getter = Object.getOwnPropertyDescriptor(RegExp.prototype, 'unicode').get; -assert.sameValue(getter.name, 'get unicode'); - -verifyNotEnumerable(getter, 'name'); -verifyNotWritable(getter, 'name'); -verifyConfigurable(getter, 'name'); +verifyProperty(getter, "name", { + value: "get unicode", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); |