diff --git a/test/language/statements/class/definition/fn-name-accessor-get.js b/test/language/statements/class/definition/fn-name-accessor-get.js index 7a8d088a89..71d88f4366 100644 --- a/test/language/statements/class/definition/fn-name-accessor-get.js +++ b/test/language/statements/class/definition/fn-name-accessor-get.js @@ -27,37 +27,49 @@ class A { } getter = Object.getOwnPropertyDescriptor(A.prototype, 'id').get; -assert.sameValue(getter.name, 'get id'); -verifyNotEnumerable(getter, 'name'); -verifyNotWritable(getter, 'name'); -verifyConfigurable(getter, 'name'); +verifyProperty(getter, 'name', { + value: 'get id', + writable: false, + enumerable: false, + configurable: true, +}); getter = Object.getOwnPropertyDescriptor(A.prototype, anonSym).get; -assert.sameValue(getter.name, 'get '); -verifyNotEnumerable(getter, 'name'); -verifyNotWritable(getter, 'name'); -verifyConfigurable(getter, 'name'); +verifyProperty(getter, 'name', { + value: 'get ', + writable: false, + enumerable: false, + configurable: true, +}); getter = Object.getOwnPropertyDescriptor(A.prototype, namedSym).get; -assert.sameValue(getter.name, 'get [test262]'); -verifyNotEnumerable(getter, 'name'); -verifyNotWritable(getter, 'name'); -verifyConfigurable(getter, 'name'); +verifyProperty(getter, 'name', { + value: 'get [test262]', + writable: false, + enumerable: false, + configurable: true, +}); getter = Object.getOwnPropertyDescriptor(A, 'id').get; -assert.sameValue(getter.name, 'get id'); -verifyNotEnumerable(getter, 'name'); -verifyNotWritable(getter, 'name'); -verifyConfigurable(getter, 'name'); +verifyProperty(getter, 'name', { + value: 'get id', + writable: false, + enumerable: false, + configurable: true, +}); getter = Object.getOwnPropertyDescriptor(A, anonSym).get; -assert.sameValue(getter.name, 'get '); -verifyNotEnumerable(getter, 'name'); -verifyNotWritable(getter, 'name'); -verifyConfigurable(getter, 'name'); +verifyProperty(getter, 'name', { + value: 'get ', + writable: false, + enumerable: false, + configurable: true, +}); getter = Object.getOwnPropertyDescriptor(A, namedSym).get; -assert.sameValue(getter.name, 'get [test262]'); -verifyNotEnumerable(getter, 'name'); -verifyNotWritable(getter, 'name'); -verifyConfigurable(getter, 'name'); +verifyProperty(getter, 'name', { + value: 'get [test262]', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/class/definition/fn-name-accessor-set.js b/test/language/statements/class/definition/fn-name-accessor-set.js index 25714ae3b4..753036e1e7 100644 --- a/test/language/statements/class/definition/fn-name-accessor-set.js +++ b/test/language/statements/class/definition/fn-name-accessor-set.js @@ -28,37 +28,49 @@ class A { } setter = Object.getOwnPropertyDescriptor(A.prototype, 'id').set; -assert.sameValue(setter.name, 'set id'); -verifyNotEnumerable(setter, 'name'); -verifyNotWritable(setter, 'name'); -verifyConfigurable(setter, 'name'); +verifyProperty(setter, 'name', { + value: 'set id', + writable: false, + enumerable: false, + configurable: true, +}); setter = Object.getOwnPropertyDescriptor(A.prototype, anonSym).set; -assert.sameValue(setter.name, 'set '); -verifyNotEnumerable(setter, 'name'); -verifyNotWritable(setter, 'name'); -verifyConfigurable(setter, 'name'); +verifyProperty(setter, 'name', { + value: 'set ', + writable: false, + enumerable: false, + configurable: true, +}); setter = Object.getOwnPropertyDescriptor(A.prototype, namedSym).set; -assert.sameValue(setter.name, 'set [test262]'); -verifyNotEnumerable(setter, 'name'); -verifyNotWritable(setter, 'name'); -verifyConfigurable(setter, 'name'); +verifyProperty(setter, 'name', { + value: 'set [test262]', + writable: false, + enumerable: false, + configurable: true, +}); setter = Object.getOwnPropertyDescriptor(A, 'id').set; -assert.sameValue(setter.name, 'set id'); -verifyNotEnumerable(setter, 'name'); -verifyNotWritable(setter, 'name'); -verifyConfigurable(setter, 'name'); +verifyProperty(setter, 'name', { + value: 'set id', + writable: false, + enumerable: false, + configurable: true, +}); setter = Object.getOwnPropertyDescriptor(A, anonSym).set; -assert.sameValue(setter.name, 'set '); -verifyNotEnumerable(setter, 'name'); -verifyNotWritable(setter, 'name'); -verifyConfigurable(setter, 'name'); +verifyProperty(setter, 'name', { + value: 'set ', + writable: false, + enumerable: false, + configurable: true, +}); setter = Object.getOwnPropertyDescriptor(A, namedSym).set; -assert.sameValue(setter.name, 'set [test262]'); -verifyNotEnumerable(setter, 'name'); -verifyNotWritable(setter, 'name'); -verifyConfigurable(setter, 'name'); +verifyProperty(setter, 'name', { + value: 'set [test262]', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/class/definition/fn-name-gen-method.js b/test/language/statements/class/definition/fn-name-gen-method.js index d3837b4c2b..b53a3ad1c5 100644 --- a/test/language/statements/class/definition/fn-name-gen-method.js +++ b/test/language/statements/class/definition/fn-name-gen-method.js @@ -27,32 +27,44 @@ class A { static *[namedSym]() {} } -assert.sameValue(A.prototype.id.name, 'id', 'via IdentifierName'); -verifyNotEnumerable(A.prototype.id, 'name'); -verifyNotWritable(A.prototype.id, 'name'); -verifyConfigurable(A.prototype.id, 'name'); +verifyProperty(A.prototype.id, 'name', { + value: 'id', + writable: false, + enumerable: false, + configurable: true, +}); -assert.sameValue(A.prototype[anonSym].name, '', 'via anonymous Symbol'); -verifyNotEnumerable(A.prototype[anonSym], 'name'); -verifyNotWritable(A.prototype[anonSym], 'name'); -verifyConfigurable(A.prototype[anonSym], 'name'); +verifyProperty(A.prototype[anonSym], 'name', { + value: '', + writable: false, + enumerable: false, + configurable: true, +}); -assert.sameValue(A.prototype[namedSym].name, '[test262]', 'via Symbol'); -verifyNotEnumerable(A.prototype[namedSym], 'name'); -verifyNotWritable(A.prototype[namedSym], 'name'); -verifyConfigurable(A.prototype[namedSym], 'name'); +verifyProperty(A.prototype[namedSym], 'name', { + value: '[test262]', + writable: false, + enumerable: false, + configurable: true, +}); -assert.sameValue(A.id.name, 'id', 'static via IdentifierName'); -verifyNotEnumerable(A.id, 'name'); -verifyNotWritable(A.id, 'name'); -verifyConfigurable(A.id, 'name'); +verifyProperty(A.id, 'name', { + value: 'id', + writable: false, + enumerable: false, + configurable: true, +}); -assert.sameValue(A[anonSym].name, '', 'static via anonymous Symbol'); -verifyNotEnumerable(A[anonSym], 'name'); -verifyNotWritable(A[anonSym], 'name'); -verifyConfigurable(A[anonSym], 'name'); +verifyProperty(A[anonSym], 'name', { + value: '', + writable: false, + enumerable: false, + configurable: true, +}); -assert.sameValue(A[namedSym].name, '[test262]', 'static via Symbol'); -verifyNotEnumerable(A[namedSym], 'name'); -verifyNotWritable(A[namedSym], 'name'); -verifyConfigurable(A[namedSym], 'name'); +verifyProperty(A[namedSym], 'name', { + value: '[test262]', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/class/definition/fn-name-method.js b/test/language/statements/class/definition/fn-name-method.js index ea06baf661..d970b5905c 100644 --- a/test/language/statements/class/definition/fn-name-method.js +++ b/test/language/statements/class/definition/fn-name-method.js @@ -26,32 +26,44 @@ class A { static [namedSym]() {} } -assert.sameValue(A.prototype.id.name, 'id', 'via IdentifierName'); -verifyNotEnumerable(A.prototype.id, 'name'); -verifyNotWritable(A.prototype.id, 'name'); -verifyConfigurable(A.prototype.id, 'name'); +verifyProperty(A.prototype.id, 'name', { + value: 'id', + writable: false, + enumerable: false, + configurable: true, +}); -assert.sameValue(A.prototype[anonSym].name, '', 'via anonymous Symbol'); -verifyNotEnumerable(A.prototype[anonSym], 'name'); -verifyNotWritable(A.prototype[anonSym], 'name'); -verifyConfigurable(A.prototype[anonSym], 'name'); +verifyProperty(A.prototype[anonSym], 'name', { + value: '', + writable: false, + enumerable: false, + configurable: true, +}); -assert.sameValue(A.prototype[namedSym].name, '[test262]', 'via Symbol'); -verifyNotEnumerable(A.prototype[namedSym], 'name'); -verifyNotWritable(A.prototype[namedSym], 'name'); -verifyConfigurable(A.prototype[namedSym], 'name'); +verifyProperty(A.prototype[namedSym], 'name', { + value: '[test262]', + writable: false, + enumerable: false, + configurable: true, +}); -assert.sameValue(A.id.name, 'id', 'static via IdentifierName'); -verifyNotEnumerable(A.id, 'name'); -verifyNotWritable(A.id, 'name'); -verifyConfigurable(A.id, 'name'); +verifyProperty(A.id, 'name', { + value: 'id', + writable: false, + enumerable: false, + configurable: true, +}); -assert.sameValue(A[anonSym].name, '', 'static via anonymous Symbol'); -verifyNotEnumerable(A[anonSym], 'name'); -verifyNotWritable(A[anonSym], 'name'); -verifyConfigurable(A[anonSym], 'name'); +verifyProperty(A[anonSym], 'name', { + value: '', + writable: false, + enumerable: false, + configurable: true, +}); -assert.sameValue(A[namedSym].name, '[test262]', 'static via Symbol'); -verifyNotEnumerable(A[namedSym], 'name'); -verifyNotWritable(A[namedSym], 'name'); -verifyConfigurable(A[namedSym], 'name'); +verifyProperty(A[namedSym], 'name', { + value: '[test262]', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/class/definition/getters-prop-desc.js b/test/language/statements/class/definition/getters-prop-desc.js index 463614680b..b855b03b8d 100644 --- a/test/language/statements/class/definition/getters-prop-desc.js +++ b/test/language/statements/class/definition/getters-prop-desc.js @@ -9,8 +9,10 @@ includes: [propertyHelper.js] function assertGetterDescriptor(object, name) { var desc = Object.getOwnPropertyDescriptor(object, name); - verifyNotEnumerable(object, name); - verifyConfigurable(object, name); + verifyProperty(object, name, { + enumerable: false, + configurable: true, + }); assert.sameValue(typeof desc.get, 'function', "`typeof desc.get` is `'function'`"); assert.sameValue('prototype' in desc.get, false, "The result of `'prototype' in desc.get` is `false`"); assert.sameValue(desc.set, undefined, "The value of `desc.set` is `undefined`"); diff --git a/test/language/statements/class/definition/setters-prop-desc.js b/test/language/statements/class/definition/setters-prop-desc.js index 055307aaea..7f1f2f614d 100644 --- a/test/language/statements/class/definition/setters-prop-desc.js +++ b/test/language/statements/class/definition/setters-prop-desc.js @@ -9,8 +9,10 @@ includes: [propertyHelper.js] function assertSetterDescriptor(object, name) { var descr = Object.getOwnPropertyDescriptor(object, name); - verifyNotEnumerable(object, name); - verifyConfigurable(object, name); + verifyProperty(object, name, { + enumerable: false, + configurable: true, + }); assert.sameValue(typeof descr.set, 'function', "`typeof descr.set` is `'function'`"); assert.sameValue('prototype' in descr.set, false, "The result of `'prototype' in descr.set` is `false`"); assert.sameValue(descr.get, undefined, "The value of `descr.get` is `undefined`"); diff --git a/test/language/statements/class/gen-method-length-dflt.js b/test/language/statements/class/gen-method-length-dflt.js index 733f569a25..8b261a3372 100644 --- a/test/language/statements/class/gen-method-length-dflt.js +++ b/test/language/statements/class/gen-method-length-dflt.js @@ -34,34 +34,42 @@ class C1 { *m(x = 42) {} } var m1 = C1.prototype.m; -assert.sameValue(m1.length, 0, 'formalslist: x = 42'); -verifyNotEnumerable(m1, 'length'); -verifyNotWritable(m1, 'length'); -verifyConfigurable(m1, 'length'); +verifyProperty(m1, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); class C2 { *m(x = 42, y) {} } var m2 = C2.prototype.m; -assert.sameValue(m2.length, 0, 'formalslist: x = 42, y'); -verifyNotEnumerable(m2, 'length'); -verifyNotWritable(m2, 'length'); -verifyConfigurable(m2, 'length'); +verifyProperty(m2, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); class C3 { *m(x, y = 42) {} } var m3 = C3.prototype.m; -assert.sameValue(m3.length, 1, 'formalslist: x, y = 42'); -verifyNotEnumerable(m3, 'length'); -verifyNotWritable(m3, 'length'); -verifyConfigurable(m3, 'length'); +verifyProperty(m3, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); class C4 { *m(x, y = 42, z) {} } var m4 = C4.prototype.m; -assert.sameValue(m4.length, 1, 'formalslist: x, y = 42, z'); -verifyNotEnumerable(m4, 'length'); -verifyNotWritable(m4, 'length'); -verifyConfigurable(m4, 'length'); +verifyProperty(m4, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/class/method-length-dflt.js b/test/language/statements/class/method-length-dflt.js index 42a742ed4b..28fcb6c0f3 100644 --- a/test/language/statements/class/method-length-dflt.js +++ b/test/language/statements/class/method-length-dflt.js @@ -34,34 +34,42 @@ class C1 { m(x = 42) {} } var m1 = C1.prototype.m; -assert.sameValue(m1.length, 0, 'formalslist: x = 42'); -verifyNotEnumerable(m1, 'length'); -verifyNotWritable(m1, 'length'); -verifyConfigurable(m1, 'length'); +verifyProperty(m1, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); class C2 { m(x = 42, y) {} } var m2 = C2.prototype.m; -assert.sameValue(m2.length, 0, 'formalslist: x = 42, y'); -verifyNotEnumerable(m2, 'length'); -verifyNotWritable(m2, 'length'); -verifyConfigurable(m2, 'length'); +verifyProperty(m2, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); class C3 { m(x, y = 42) {} } var m3 = C3.prototype.m; -assert.sameValue(m3.length, 1, 'formalslist: x, y = 42'); -verifyNotEnumerable(m3, 'length'); -verifyNotWritable(m3, 'length'); -verifyConfigurable(m3, 'length'); +verifyProperty(m3, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); class C4 { m(x, y = 42, z) {} } var m4 = C4.prototype.m; -assert.sameValue(m4.length, 1, 'formalslist: x, y = 42, z'); -verifyNotEnumerable(m4, 'length'); -verifyNotWritable(m4, 'length'); -verifyConfigurable(m4, 'length'); +verifyProperty(m4, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/class/name.js b/test/language/statements/class/name.js index 8bc58b2b99..b2f0541568 100644 --- a/test/language/statements/class/name.js +++ b/test/language/statements/class/name.js @@ -15,7 +15,9 @@ includes: [propertyHelper.js] class Test262 {} -assert.sameValue(Test262.name, 'Test262'); -verifyNotEnumerable(Test262, 'name'); -verifyNotWritable(Test262, 'name'); -verifyConfigurable(Test262, 'name'); +verifyProperty(Test262, "name", { + value: "Test262", + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/class/setter-length-dflt.js b/test/language/statements/class/setter-length-dflt.js index b6a962d686..ef19376bd4 100644 --- a/test/language/statements/class/setter-length-dflt.js +++ b/test/language/statements/class/setter-length-dflt.js @@ -33,7 +33,9 @@ includes: [propertyHelper.js] class C { set m(x = 42) {} } var set = Object.getOwnPropertyDescriptor(C.prototype, 'm').set; -assert.sameValue(set.length, 0, 'FormalsList: x = 42'); -verifyNotEnumerable(set, 'length'); -verifyNotWritable(set, 'length'); -verifyConfigurable(set, 'length'); +verifyProperty(set, 'length', { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/class/static-method-length-dflt.js b/test/language/statements/class/static-method-length-dflt.js index 4a008d9fc8..d788d37f1a 100644 --- a/test/language/statements/class/static-method-length-dflt.js +++ b/test/language/statements/class/static-method-length-dflt.js @@ -34,34 +34,42 @@ class C1 { static m(x = 42) {} } var m1 = C1.m; -assert.sameValue(m1.length, 0, 'formalslist: x = 42'); -verifyNotEnumerable(m1, 'length'); -verifyNotWritable(m1, 'length'); -verifyConfigurable(m1, 'length'); +verifyProperty(m1, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); class C2 { static m(x = 42, y) {} } var m2 = C2.m; -assert.sameValue(m2.length, 0, 'formalslist: x = 42, y'); -verifyNotEnumerable(m2, 'length'); -verifyNotWritable(m2, 'length'); -verifyConfigurable(m2, 'length'); +verifyProperty(m2, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); class C3 { static m(x, y = 42) {} } var m3 = C3.m; -assert.sameValue(m3.length, 1, 'formalslist: x, y = 42'); -verifyNotEnumerable(m3, 'length'); -verifyNotWritable(m3, 'length'); -verifyConfigurable(m3, 'length'); +verifyProperty(m3, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); class C4 { static m(x, y = 42, z) {} } var m4 = C4.m; -assert.sameValue(m4.length, 1, 'formalslist: x, y = 42, z'); -verifyNotEnumerable(m4, 'length'); -verifyNotWritable(m4, 'length'); -verifyConfigurable(m4, 'length'); +verifyProperty(m4, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/class/subclass/builtin-objects/Error/message-property-assignment.js b/test/language/statements/class/subclass/builtin-objects/Error/message-property-assignment.js index 1d59dc3df3..e87d30d01b 100644 --- a/test/language/statements/class/subclass/builtin-objects/Error/message-property-assignment.js +++ b/test/language/statements/class/subclass/builtin-objects/Error/message-property-assignment.js @@ -24,12 +24,13 @@ class Err extends Error {} Err.prototype.message = 'custom-error'; var err1 = new Err('foo 42'); -assert.sameValue(err1.message, 'foo 42'); -assert(err1.hasOwnProperty('message')); -verifyWritable(err1, 'message'); -verifyNotEnumerable(err1, 'message'); -verifyConfigurable(err1, 'message'); +verifyProperty(err1, 'message', { + value: 'foo 42', + writable: true, + enumerable: false, + configurable: true, +}); var err2 = new Err(); assert.sameValue(err2.hasOwnProperty('message'), false); diff --git a/test/language/statements/class/subclass/builtin-objects/Function/instance-length.js b/test/language/statements/class/subclass/builtin-objects/Function/instance-length.js index 82468eb227..acdb7df6ff 100644 --- a/test/language/statements/class/subclass/builtin-objects/Function/instance-length.js +++ b/test/language/statements/class/subclass/builtin-objects/Function/instance-length.js @@ -20,8 +20,9 @@ class Fn extends Function {} var fn = new Fn('a', 'b', 'return a + b'); -assert.sameValue(fn.length, 2); - -verifyNotEnumerable(fn, 'length'); -verifyNotWritable(fn, 'length'); -verifyConfigurable(fn, 'length'); +verifyProperty(fn, 'length', { + value: 2, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/class/subclass/builtin-objects/Function/instance-name.js b/test/language/statements/class/subclass/builtin-objects/Function/instance-name.js index 262fe0f6b6..4a0cdffb1f 100644 --- a/test/language/statements/class/subclass/builtin-objects/Function/instance-name.js +++ b/test/language/statements/class/subclass/builtin-objects/Function/instance-name.js @@ -29,11 +29,9 @@ class Fn extends Function {} var fn = new Fn('a', 'b', 'return a + b'); -assert.sameValue( - fn.name, 'anonymous', - 'Dynamic Functions are called anonymous' -); - -verifyNotEnumerable(fn, 'name'); -verifyNotWritable(fn, 'name'); -verifyConfigurable(fn, 'name'); +verifyProperty(fn, 'name', { + value: 'anonymous', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/class/subclass/builtin-objects/GeneratorFunction/instance-length.js b/test/language/statements/class/subclass/builtin-objects/GeneratorFunction/instance-length.js index 9b6e7bad6b..614f2d80f5 100644 --- a/test/language/statements/class/subclass/builtin-objects/GeneratorFunction/instance-length.js +++ b/test/language/statements/class/subclass/builtin-objects/GeneratorFunction/instance-length.js @@ -24,8 +24,9 @@ class GFn extends GeneratorFunction {} var gfn = new GFn('a', 'b', 'return a + b'); -assert.sameValue(gfn.length, 2); - -verifyNotEnumerable(gfn, 'length'); -verifyNotWritable(gfn, 'length'); -verifyConfigurable(gfn, 'length'); +verifyProperty(gfn, 'length', { + value: 2, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/class/subclass/builtin-objects/GeneratorFunction/instance-name.js b/test/language/statements/class/subclass/builtin-objects/GeneratorFunction/instance-name.js index 53eb8ad3df..4cadc71875 100644 --- a/test/language/statements/class/subclass/builtin-objects/GeneratorFunction/instance-name.js +++ b/test/language/statements/class/subclass/builtin-objects/GeneratorFunction/instance-name.js @@ -36,11 +36,9 @@ class GFn extends GeneratorFunction {} var gfn = new GFn('a', 'b', 'return a + b'); -assert.sameValue( - gfn.name, 'anonymous', - 'Dynamic Functions are called anonymous' -); - -verifyNotEnumerable(gfn, 'name'); -verifyNotWritable(gfn, 'name'); -verifyConfigurable(gfn, 'name'); +verifyProperty(gfn, 'name', { + value: 'anonymous', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/class/subclass/builtin-objects/GeneratorFunction/instance-prototype.js b/test/language/statements/class/subclass/builtin-objects/GeneratorFunction/instance-prototype.js index 55603a04cb..dd49658156 100644 --- a/test/language/statements/class/subclass/builtin-objects/GeneratorFunction/instance-prototype.js +++ b/test/language/statements/class/subclass/builtin-objects/GeneratorFunction/instance-prototype.js @@ -33,6 +33,8 @@ assert.sameValue( 'prototype has no constructor reference' ); -verifyNotEnumerable(gfn, 'prototype'); -verifyWritable(gfn, 'prototype'); -verifyNotConfigurable(gfn, 'prototype'); +verifyProperty(gfn, 'prototype', { + writable: true, + enumerable: false, + configurable: false, +}); diff --git a/test/language/statements/class/subclass/builtin-objects/NativeError/EvalError-message.js b/test/language/statements/class/subclass/builtin-objects/NativeError/EvalError-message.js index bbfc96f67a..e7427246fe 100644 --- a/test/language/statements/class/subclass/builtin-objects/NativeError/EvalError-message.js +++ b/test/language/statements/class/subclass/builtin-objects/NativeError/EvalError-message.js @@ -23,12 +23,13 @@ class Err extends EvalError {} Err.prototype.message = 'custom-eval-error'; var err1 = new Err('foo 42'); -assert.sameValue(err1.message, 'foo 42'); -assert(err1.hasOwnProperty('message')); -verifyWritable(err1, 'message'); -verifyNotEnumerable(err1, 'message'); -verifyConfigurable(err1, 'message'); +verifyProperty(err1, 'message', { + value: 'foo 42', + writable: true, + enumerable: false, + configurable: true, +}); var err2 = new Err(); assert.sameValue(err2.hasOwnProperty('message'), false); diff --git a/test/language/statements/class/subclass/builtin-objects/NativeError/RangeError-message.js b/test/language/statements/class/subclass/builtin-objects/NativeError/RangeError-message.js index 8f18fa4424..10b018d479 100644 --- a/test/language/statements/class/subclass/builtin-objects/NativeError/RangeError-message.js +++ b/test/language/statements/class/subclass/builtin-objects/NativeError/RangeError-message.js @@ -23,12 +23,13 @@ class Err extends RangeError {} Err.prototype.message = 'custom-range-error'; var err1 = new Err('foo 42'); -assert.sameValue(err1.message, 'foo 42'); -assert(err1.hasOwnProperty('message')); -verifyWritable(err1, 'message'); -verifyNotEnumerable(err1, 'message'); -verifyConfigurable(err1, 'message'); +verifyProperty(err1, 'message', { + value: 'foo 42', + writable: true, + enumerable: false, + configurable: true, +}); var err2 = new Err(); assert.sameValue(err2.hasOwnProperty('message'), false); diff --git a/test/language/statements/class/subclass/builtin-objects/NativeError/ReferenceError-message.js b/test/language/statements/class/subclass/builtin-objects/NativeError/ReferenceError-message.js index 5d7a86fc02..6c9432d0ec 100644 --- a/test/language/statements/class/subclass/builtin-objects/NativeError/ReferenceError-message.js +++ b/test/language/statements/class/subclass/builtin-objects/NativeError/ReferenceError-message.js @@ -23,12 +23,13 @@ class Err extends ReferenceError {} Err.prototype.message = 'custom-reference-error'; var err1 = new Err('foo 42'); -assert.sameValue(err1.message, 'foo 42'); -assert(err1.hasOwnProperty('message')); -verifyWritable(err1, 'message'); -verifyNotEnumerable(err1, 'message'); -verifyConfigurable(err1, 'message'); +verifyProperty(err1, 'message', { + value: 'foo 42', + writable: true, + enumerable: false, + configurable: true, +}); var err2 = new Err(); assert.sameValue(err2.hasOwnProperty('message'), false); diff --git a/test/language/statements/class/subclass/builtin-objects/NativeError/SyntaxError-message.js b/test/language/statements/class/subclass/builtin-objects/NativeError/SyntaxError-message.js index a88340dbdd..c90450b6ec 100644 --- a/test/language/statements/class/subclass/builtin-objects/NativeError/SyntaxError-message.js +++ b/test/language/statements/class/subclass/builtin-objects/NativeError/SyntaxError-message.js @@ -23,12 +23,13 @@ class Err extends SyntaxError {} Err.prototype.message = 'custom-syntax-error'; var err1 = new Err('foo 42'); -assert.sameValue(err1.message, 'foo 42'); -assert(err1.hasOwnProperty('message')); -verifyWritable(err1, 'message'); -verifyNotEnumerable(err1, 'message'); -verifyConfigurable(err1, 'message'); +verifyProperty(err1, 'message', { + value: 'foo 42', + writable: true, + enumerable: false, + configurable: true, +}); var err2 = new Err(); assert.sameValue(err2.hasOwnProperty('message'), false); diff --git a/test/language/statements/class/subclass/builtin-objects/NativeError/TypeError-message.js b/test/language/statements/class/subclass/builtin-objects/NativeError/TypeError-message.js index 030ffb5f73..fb19633a53 100644 --- a/test/language/statements/class/subclass/builtin-objects/NativeError/TypeError-message.js +++ b/test/language/statements/class/subclass/builtin-objects/NativeError/TypeError-message.js @@ -23,12 +23,13 @@ class Err extends TypeError {} Err.prototype.message = 'custom-type-error'; var err1 = new Err('foo 42'); -assert.sameValue(err1.message, 'foo 42'); -assert(err1.hasOwnProperty('message')); -verifyWritable(err1, 'message'); -verifyNotEnumerable(err1, 'message'); -verifyConfigurable(err1, 'message'); +verifyProperty(err1, 'message', { + value: 'foo 42', + writable: true, + enumerable: false, + configurable: true, +}); var err2 = new Err(); assert.sameValue(err2.hasOwnProperty('message'), false); diff --git a/test/language/statements/class/subclass/builtin-objects/NativeError/URIError-message.js b/test/language/statements/class/subclass/builtin-objects/NativeError/URIError-message.js index 45f783ec9a..03438676c0 100644 --- a/test/language/statements/class/subclass/builtin-objects/NativeError/URIError-message.js +++ b/test/language/statements/class/subclass/builtin-objects/NativeError/URIError-message.js @@ -23,12 +23,13 @@ class Err extends URIError {} Err.prototype.message = 'custom-uri-error'; var err1 = new Err('foo 42'); -assert.sameValue(err1.message, 'foo 42'); -assert(err1.hasOwnProperty('message')); -verifyWritable(err1, 'message'); -verifyNotEnumerable(err1, 'message'); -verifyConfigurable(err1, 'message'); +verifyProperty(err1, 'message', { + value: 'foo 42', + writable: true, + enumerable: false, + configurable: true, +}); var err2 = new Err(); assert.sameValue(err2.hasOwnProperty('message'), false); diff --git a/test/language/statements/class/subclass/builtin-objects/RegExp/lastIndex.js b/test/language/statements/class/subclass/builtin-objects/RegExp/lastIndex.js index 2852f80635..be9b9ec400 100644 --- a/test/language/statements/class/subclass/builtin-objects/RegExp/lastIndex.js +++ b/test/language/statements/class/subclass/builtin-objects/RegExp/lastIndex.js @@ -19,8 +19,9 @@ var re = new RE('39?'); re.exec('TC39'); -assert.sameValue(re.lastIndex, 0); - -verifyWritable(re, 'lastIndex'); -verifyNotEnumerable(re, 'lastIndex'); -verifyNotConfigurable(re, 'lastIndex'); +verifyProperty(re, 'lastIndex', { + value: 0, + writable: true, + enumerable: false, + configurable: false, +}); diff --git a/test/language/statements/class/subclass/builtin-objects/String/length.js b/test/language/statements/class/subclass/builtin-objects/String/length.js index fd373586a5..522b33c8f4 100644 --- a/test/language/statements/class/subclass/builtin-objects/String/length.js +++ b/test/language/statements/class/subclass/builtin-objects/String/length.js @@ -16,15 +16,19 @@ includes: [propertyHelper.js] class S extends String {} var s1 = new S(); -assert.sameValue(s1.length, 0); -verifyNotWritable(s1, 'length'); -verifyNotEnumerable(s1, 'length'); -verifyNotConfigurable(s1, 'length'); +verifyProperty(s1, 'length', { + value: 0, + writable: false, + enumerable: false, + configurable: false, +}); var s2 = new S('test262'); -assert.sameValue(s2.length, 7); -verifyNotWritable(s2, 'length'); -verifyNotEnumerable(s2, 'length'); -verifyNotConfigurable(s2, 'length'); +verifyProperty(s2, 'length', { + value: 7, + writable: false, + enumerable: false, + configurable: false, +}); diff --git a/test/language/statements/const/fn-name-arrow.js b/test/language/statements/const/fn-name-arrow.js index 1ed11a6fa5..39a3737c90 100644 --- a/test/language/statements/const/fn-name-arrow.js +++ b/test/language/statements/const/fn-name-arrow.js @@ -18,7 +18,9 @@ includes: [propertyHelper.js] const arrow = () => {}; -assert.sameValue(arrow.name, 'arrow'); -verifyNotEnumerable(arrow, 'name'); -verifyNotWritable(arrow, 'name'); -verifyConfigurable(arrow, 'name'); +verifyProperty(arrow, "name", { + value: "arrow", + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/const/fn-name-class.js b/test/language/statements/const/fn-name-class.js index cdccec399a..28e3656132 100644 --- a/test/language/statements/const/fn-name-class.js +++ b/test/language/statements/const/fn-name-class.js @@ -24,7 +24,9 @@ const xCls2 = class { static name() {} }; assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls2.name, 'xCls2'); -assert.sameValue(cls.name, 'cls'); -verifyNotEnumerable(cls, 'name'); -verifyNotWritable(cls, 'name'); -verifyConfigurable(cls, 'name'); +verifyProperty(cls, 'name', { + value: 'cls', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/const/fn-name-cover.js b/test/language/statements/const/fn-name-cover.js index da8ff31f73..4e88086591 100644 --- a/test/language/statements/const/fn-name-cover.js +++ b/test/language/statements/const/fn-name-cover.js @@ -22,7 +22,9 @@ const cover = (function() {}); assert(xCover.name !== 'xCover'); -assert.sameValue(cover.name, 'cover'); -verifyNotEnumerable(cover, 'name'); -verifyNotWritable(cover, 'name'); -verifyConfigurable(cover, 'name'); +verifyProperty(cover, 'name', { + value: 'cover', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/const/fn-name-fn.js b/test/language/statements/const/fn-name-fn.js index 2dfc62a58d..c28ebdb029 100644 --- a/test/language/statements/const/fn-name-fn.js +++ b/test/language/statements/const/fn-name-fn.js @@ -21,7 +21,9 @@ const fn = function() {}; assert(xFn.name !== 'xFn'); -assert.sameValue(fn.name, 'fn'); -verifyNotEnumerable(fn, 'name'); -verifyNotWritable(fn, 'name'); -verifyConfigurable(fn, 'name'); +verifyProperty(fn, 'name', { + value: 'fn', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/const/fn-name-gen.js b/test/language/statements/const/fn-name-gen.js index 81092df839..a1f4925990 100644 --- a/test/language/statements/const/fn-name-gen.js +++ b/test/language/statements/const/fn-name-gen.js @@ -22,7 +22,9 @@ const gen = function*() {}; assert(xGen.name !== 'xGen'); -assert.sameValue(gen.name, 'gen'); -verifyNotEnumerable(gen, 'name'); -verifyNotWritable(gen, 'name'); -verifyConfigurable(gen, 'name'); +verifyProperty(gen, 'name', { + value: 'gen', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/function/13.2-15-1.js b/test/language/statements/function/13.2-15-1.js index b983df6d3b..9f741b9fae 100644 --- a/test/language/statements/function/13.2-15-1.js +++ b/test/language/statements/function/13.2-15-1.js @@ -11,9 +11,9 @@ includes: [propertyHelper.js] var fun = function (x, y) { }; -assert(fun.hasOwnProperty("length")); -assert.sameValue(fun.length, 2); - -verifyNotEnumerable(fun, "length"); -verifyNotWritable(fun, "length"); -verifyConfigurable(fun, "length"); +verifyProperty(fun, "length", { + value: 2, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/function/13.2-18-1.js b/test/language/statements/function/13.2-18-1.js index c160920dae..35fb794f45 100644 --- a/test/language/statements/function/13.2-18-1.js +++ b/test/language/statements/function/13.2-18-1.js @@ -30,9 +30,11 @@ try { assert.notSameValue(fun.prototype, 100); assert.sameValue(fun.prototype.toString(), "[object Object]"); - verifyNotEnumerable(fun, "prototype"); - verifyWritable(fun, "prototype"); - verifyNotConfigurable(fun, "prototype"); + verifyProperty(fun, "prototype", { + writable: true, + enumerable: false, + configurable: false, + }); assert.sameValue(data, "data"); } finally { diff --git a/test/language/statements/function/length-dflt.js b/test/language/statements/function/length-dflt.js index edcc10fb85..1650b88463 100644 --- a/test/language/statements/function/length-dflt.js +++ b/test/language/statements/function/length-dflt.js @@ -33,28 +33,36 @@ includes: [propertyHelper.js] function f1(x = 42) {} -assert.sameValue(f1.length, 0, 'FormalsList: x = 42'); -verifyNotEnumerable(f1, 'length'); -verifyNotWritable(f1, 'length'); -verifyConfigurable(f1, 'length'); +verifyProperty(f1, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); function f2(x = 42, y) {} -assert.sameValue(f2.length, 0, 'FormalsList: x = 42, y'); -verifyNotEnumerable(f2, 'length'); -verifyNotWritable(f2, 'length'); -verifyConfigurable(f2, 'length'); +verifyProperty(f2, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); function f3(x, y = 42) {} -assert.sameValue(f3.length, 1, 'FormalsList: x, y = 42'); -verifyNotEnumerable(f3, 'length'); -verifyNotWritable(f3, 'length'); -verifyConfigurable(f3, 'length'); +verifyProperty(f3, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); function f4(x, y = 42, z) {} -assert.sameValue(f4.length, 1, 'FormalsList: x, y = 42, z'); -verifyNotEnumerable(f4, 'length'); -verifyNotWritable(f4, 'length'); -verifyConfigurable(f4, 'length'); +verifyProperty(f4, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/function/name.js b/test/language/statements/function/name.js index 9f0144f8c1..f7555a899a 100644 --- a/test/language/statements/function/name.js +++ b/test/language/statements/function/name.js @@ -18,7 +18,9 @@ includes: [propertyHelper.js] function func() {} -assert.sameValue(func.name, 'func'); -verifyNotEnumerable(func, 'name'); -verifyNotWritable(func, 'name'); -verifyConfigurable(func, 'name'); +verifyProperty(func, "name", { + value: "func", + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/generators/length-dflt.js b/test/language/statements/generators/length-dflt.js index 747434017a..f082ee3445 100644 --- a/test/language/statements/generators/length-dflt.js +++ b/test/language/statements/generators/length-dflt.js @@ -33,28 +33,36 @@ includes: [propertyHelper.js] function* f1(x = 42) {} -assert.sameValue(f1.length, 0, 'FormalsList: x = 42'); -verifyNotEnumerable(f1, 'length'); -verifyNotWritable(f1, 'length'); -verifyConfigurable(f1, 'length'); +verifyProperty(f1, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); function* f2(x = 42, y) {} -assert.sameValue(f2.length, 0, 'FormalsList: x = 42, y'); -verifyNotEnumerable(f2, 'length'); -verifyNotWritable(f2, 'length'); -verifyConfigurable(f2, 'length'); +verifyProperty(f2, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); function* f3(x, y = 42) {} -assert.sameValue(f3.length, 1, 'FormalsList: x, y = 42'); -verifyNotEnumerable(f3, 'length'); -verifyNotWritable(f3, 'length'); -verifyConfigurable(f3, 'length'); +verifyProperty(f3, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); function* f4(x, y = 42, z) {} -assert.sameValue(f4.length, 1, 'FormalsList: x, y = 42, z'); -verifyNotEnumerable(f4, 'length'); -verifyNotWritable(f4, 'length'); -verifyConfigurable(f4, 'length'); +verifyProperty(f4, "length", { + value: 1, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/generators/length-property-descriptor.js b/test/language/statements/generators/length-property-descriptor.js index 7cdf89106f..3ed095937b 100644 --- a/test/language/statements/generators/length-property-descriptor.js +++ b/test/language/statements/generators/length-property-descriptor.js @@ -11,7 +11,9 @@ features: [generators] function* g() {} -assert.sameValue(g.length, 0); -verifyNotEnumerable(g, 'length'); -verifyNotWritable(g, 'length'); -verifyConfigurable(g, 'length'); +verifyProperty(g, "length", { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/generators/name.js b/test/language/statements/generators/name.js index be9099b827..d4237e3557 100644 --- a/test/language/statements/generators/name.js +++ b/test/language/statements/generators/name.js @@ -16,7 +16,9 @@ features: [generators] function* g() {} -assert.sameValue(g.name, 'g'); -verifyNotEnumerable(g, 'name'); -verifyNotWritable(g, 'name'); -verifyConfigurable(g, 'name'); +verifyProperty(g, "name", { + value: "g", + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/generators/prototype-property-descriptor.js b/test/language/statements/generators/prototype-property-descriptor.js index a69b8cef87..65f2ddd04d 100644 --- a/test/language/statements/generators/prototype-property-descriptor.js +++ b/test/language/statements/generators/prototype-property-descriptor.js @@ -11,6 +11,8 @@ features: [generators] function* g() {} -verifyNotEnumerable(g, 'prototype'); -verifyWritable(g, 'prototype'); -verifyNotConfigurable(g, 'prototype'); +verifyProperty(g, "prototype", { + writable: true, + enumerable: false, + configurable: false, +}); diff --git a/test/language/statements/let/fn-name-arrow.js b/test/language/statements/let/fn-name-arrow.js index 04d8acbe0c..1821d75765 100644 --- a/test/language/statements/let/fn-name-arrow.js +++ b/test/language/statements/let/fn-name-arrow.js @@ -18,7 +18,9 @@ includes: [propertyHelper.js] let arrow = () => {}; -assert.sameValue(arrow.name, 'arrow'); -verifyNotEnumerable(arrow, 'name'); -verifyNotWritable(arrow, 'name'); -verifyConfigurable(arrow, 'name'); +verifyProperty(arrow, 'name', { + value: 'arrow', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/let/fn-name-class.js b/test/language/statements/let/fn-name-class.js index 2519dac613..3a062624c9 100644 --- a/test/language/statements/let/fn-name-class.js +++ b/test/language/statements/let/fn-name-class.js @@ -24,7 +24,9 @@ let xCls2 = class { static name() {} }; assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls2.name, 'xCls2'); -assert.sameValue(cls.name, 'cls'); -verifyNotEnumerable(cls, 'name'); -verifyNotWritable(cls, 'name'); -verifyConfigurable(cls, 'name'); +verifyProperty(cls, 'name', { + value: 'cls', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/let/fn-name-cover.js b/test/language/statements/let/fn-name-cover.js index 5a1c6c2491..82d9fec3a5 100644 --- a/test/language/statements/let/fn-name-cover.js +++ b/test/language/statements/let/fn-name-cover.js @@ -22,7 +22,9 @@ let cover = (function() {}); assert(xCover.name !== 'xCover'); -assert.sameValue(cover.name, 'cover'); -verifyNotEnumerable(cover, 'name'); -verifyNotWritable(cover, 'name'); -verifyConfigurable(cover, 'name'); +verifyProperty(cover, 'name', { + value: 'cover', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/let/fn-name-fn.js b/test/language/statements/let/fn-name-fn.js index 0b5459bb5c..0a6b830976 100644 --- a/test/language/statements/let/fn-name-fn.js +++ b/test/language/statements/let/fn-name-fn.js @@ -21,7 +21,9 @@ let fn = function() {}; assert(xFn.name !== 'xFn'); -assert.sameValue(fn.name, 'fn'); -verifyNotEnumerable(fn, 'name'); -verifyNotWritable(fn, 'name'); -verifyConfigurable(fn, 'name'); +verifyProperty(fn, 'name', { + value: 'fn', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/let/fn-name-gen.js b/test/language/statements/let/fn-name-gen.js index 3725cce9be..b41b4afd57 100644 --- a/test/language/statements/let/fn-name-gen.js +++ b/test/language/statements/let/fn-name-gen.js @@ -22,7 +22,9 @@ let gen = function*() {}; assert(xGen.name !== 'xGen'); -assert.sameValue(gen.name, 'gen'); -verifyNotEnumerable(gen, 'name'); -verifyNotWritable(gen, 'name'); -verifyConfigurable(gen, 'name'); +verifyProperty(gen, 'name', { + value: 'gen', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/variable/fn-name-arrow.js b/test/language/statements/variable/fn-name-arrow.js index e04a23ef19..2e858a6276 100644 --- a/test/language/statements/variable/fn-name-arrow.js +++ b/test/language/statements/variable/fn-name-arrow.js @@ -18,7 +18,9 @@ includes: [propertyHelper.js] var arrow = () => {}; -assert.sameValue(arrow.name, 'arrow'); -verifyNotEnumerable(arrow, 'name'); -verifyNotWritable(arrow, 'name'); -verifyConfigurable(arrow, 'name'); +verifyProperty(arrow, 'name', { + value: 'arrow', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/variable/fn-name-class.js b/test/language/statements/variable/fn-name-class.js index e694ec83e6..7fd1e71768 100644 --- a/test/language/statements/variable/fn-name-class.js +++ b/test/language/statements/variable/fn-name-class.js @@ -24,7 +24,9 @@ var xCls2 = class { static name() {} }; assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls2.name, 'xCls2'); -assert.sameValue(cls.name, 'cls'); -verifyNotEnumerable(cls, 'name'); -verifyNotWritable(cls, 'name'); -verifyConfigurable(cls, 'name'); +verifyProperty(cls, 'name', { + value: 'cls', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/variable/fn-name-cover.js b/test/language/statements/variable/fn-name-cover.js index 0dfede117a..0524eadc4a 100644 --- a/test/language/statements/variable/fn-name-cover.js +++ b/test/language/statements/variable/fn-name-cover.js @@ -22,7 +22,9 @@ var cover = (function() {}); assert(xCover.name !== 'xCover'); -assert.sameValue(cover.name, 'cover'); -verifyNotEnumerable(cover, 'name'); -verifyNotWritable(cover, 'name'); -verifyConfigurable(cover, 'name'); +verifyProperty(cover, 'name', { + value: 'cover', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/variable/fn-name-fn.js b/test/language/statements/variable/fn-name-fn.js index 1f7745ae88..d4a294c3b1 100644 --- a/test/language/statements/variable/fn-name-fn.js +++ b/test/language/statements/variable/fn-name-fn.js @@ -21,7 +21,9 @@ var fn = function() {}; assert(xFn.name !== 'xFn'); -assert.sameValue(fn.name, 'fn'); -verifyNotEnumerable(fn, 'name'); -verifyNotWritable(fn, 'name'); -verifyConfigurable(fn, 'name'); +verifyProperty(fn, 'name', { + value: 'fn', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/language/statements/variable/fn-name-gen.js b/test/language/statements/variable/fn-name-gen.js index 3f28e9d7c9..582efe5cbc 100644 --- a/test/language/statements/variable/fn-name-gen.js +++ b/test/language/statements/variable/fn-name-gen.js @@ -22,7 +22,9 @@ var gen = function*() {}; assert(xGen.name !== 'xGen'); -assert.sameValue(gen.name, 'gen'); -verifyNotEnumerable(gen, 'name'); -verifyNotWritable(gen, 'name'); -verifyConfigurable(gen, 'name'); +verifyProperty(gen, 'name', { + value: 'gen', + writable: false, + enumerable: false, + configurable: true, +});