diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/GeneratorPrototype/throw')
3 files changed, 13 insertions, 11 deletions
diff --git a/js/src/tests/test262/built-ins/GeneratorPrototype/throw/length.js b/js/src/tests/test262/built-ins/GeneratorPrototype/throw/length.js index 75c2f6b2a3..6a933bb835 100644 --- a/js/src/tests/test262/built-ins/GeneratorPrototype/throw/length.js +++ b/js/src/tests/test262/built-ins/GeneratorPrototype/throw/length.js @@ -26,10 +26,11 @@ features: [generators] function* g() {} var GeneratorPrototype = Object.getPrototypeOf(g).prototype; -assert.sameValue(GeneratorPrototype.throw.length, 1); - -verifyNotEnumerable(GeneratorPrototype.throw, "length"); -verifyNotWritable(GeneratorPrototype.throw, "length"); -verifyConfigurable(GeneratorPrototype.throw, "length"); +verifyProperty(GeneratorPrototype.throw, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/GeneratorPrototype/throw/name.js b/js/src/tests/test262/built-ins/GeneratorPrototype/throw/name.js index d167bbc1cc..93bc41696d 100644 --- a/js/src/tests/test262/built-ins/GeneratorPrototype/throw/name.js +++ b/js/src/tests/test262/built-ins/GeneratorPrototype/throw/name.js @@ -23,10 +23,11 @@ features: [generators] function* g() {} var GeneratorPrototype = Object.getPrototypeOf(g).prototype; -assert.sameValue(GeneratorPrototype.throw.name, "throw"); - -verifyNotEnumerable(GeneratorPrototype.throw, "name"); -verifyNotWritable(GeneratorPrototype.throw, "name"); -verifyConfigurable(GeneratorPrototype.throw, "name"); +verifyProperty(GeneratorPrototype.throw, "name", { + value: "throw", + writable: false, + enumerable: false, + configurable: true +}); reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/GeneratorPrototype/throw/not-a-constructor.js b/js/src/tests/test262/built-ins/GeneratorPrototype/throw/not-a-constructor.js index d8d39a4db5..e7702e6f5d 100644 --- a/js/src/tests/test262/built-ins/GeneratorPrototype/throw/not-a-constructor.js +++ b/js/src/tests/test262/built-ins/GeneratorPrototype/throw/not-a-constructor.js @@ -29,7 +29,7 @@ assert.sameValue( assert.throws(TypeError, () => { function* g() {} let expected = new Test262Error(); let iterator = g();try {new iterator.throw(expected);} catch (e) {if (e !== expected) {throw e;}} -}, '`function* g() {} let expected = new Test262Error(); let iterator = g();try {new iterator.throw(expected);} catch (e) {if (e !== expected) {throw e;}}` throws TypeError'); +}); reportCompare(0, 0); |