diff --git a/test/language/expressions/class/fields-after-same-line-gen-computed-names.js b/test/language/expressions/class/fields-after-same-line-gen-computed-names.js index 276f5ea3ecf1c49baecf75e1f69dfa5b8827a325..874f2cdfcbca5fe69026d1bafaeac8715a5a519d 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-computed-names.js +++ b/test/language/expressions/class/fields-after-same-line-gen-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; var C = class { - *m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + *m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -40,16 +40,6 @@ verifyProperty(C.prototype, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-after-same-line-gen-static-computed-names.js b/test/language/expressions/class/fields-after-same-line-gen-static-computed-names.js deleted file mode 100644 index d4eb5d94a56757e5200e807b7515833ee0108e88..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-gen-static-computed-names.js +++ /dev/null @@ -1,56 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-after-same-line-gen.template -/*--- -description: Static Computed property names (field definitions after a generator in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - *m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/expressions/class/fields-after-same-line-gen-static-computed-symbol-names.js b/test/language/expressions/class/fields-after-same-line-gen-static-computed-symbol-names.js deleted file mode 100644 index 434717683a99a6a30b5ce014ce8c888080660701..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-gen-static-computed-symbol-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-after-same-line-gen.template -/*--- -description: Static computed property symbol names (field definitions after a generator in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - *m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/expressions/class/fields-after-same-line-gen-static-literal-names.js b/test/language/expressions/class/fields-after-same-line-gen-static-literal-names.js deleted file mode 100644 index 385c526537650c4715a0f75d0d7671130bb4f44e..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-gen-static-literal-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-after-same-line-gen.template -/*--- -description: Static literal property names (field definitions after a generator in the same line) -esid: prod-FieldDefinition -features: [generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - *m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/expressions/class/fields-after-same-line-gen-static-private-names.js b/test/language/expressions/class/fields-after-same-line-gen-static-private-names.js deleted file mode 100644 index 5264b5e10522589f2cb6d9bd4b67dc49c1538cef..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-gen-static-private-names.js +++ /dev/null @@ -1,66 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-after-same-line-gen.template -/*--- -description: literal private names (field definitions after a generator in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - *m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/expressions/class/fields-after-same-line-method-computed-names.js b/test/language/expressions/class/fields-after-same-line-method-computed-names.js index 3cf693950be959e408cd2ab34d84edc69b2ced58..21da8910229ec7ccdc29c65e675b890780e1b2ec 100644 --- a/test/language/expressions/class/fields-after-same-line-method-computed-names.js +++ b/test/language/expressions/class/fields-after-same-line-method-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; var C = class { - m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -40,16 +40,6 @@ verifyProperty(C.prototype, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-after-same-line-method-static-computed-names.js b/test/language/expressions/class/fields-after-same-line-method-static-computed-names.js deleted file mode 100644 index c9e4909fc923c4393da8fb1a12a5b44956577586..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-method-static-computed-names.js +++ /dev/null @@ -1,56 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-after-same-line-method.template -/*--- -description: Static Computed property names (field definitions after a method in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/expressions/class/fields-after-same-line-method-static-computed-symbol-names.js b/test/language/expressions/class/fields-after-same-line-method-static-computed-symbol-names.js deleted file mode 100644 index ff9639338ded3e099dea70b6db3fe74ee959877c..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-method-static-computed-symbol-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-after-same-line-method.template -/*--- -description: Static computed property symbol names (field definitions after a method in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/expressions/class/fields-after-same-line-method-static-literal-names.js b/test/language/expressions/class/fields-after-same-line-method-static-literal-names.js deleted file mode 100644 index 11fd3d4eb27c9bf3400d9fb06d8868c1b27be40e..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-method-static-literal-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-after-same-line-method.template -/*--- -description: Static literal property names (field definitions after a method in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/expressions/class/fields-after-same-line-method-static-private-names.js b/test/language/expressions/class/fields-after-same-line-method-static-private-names.js deleted file mode 100644 index a8e2ec2833910445c01d37d43a1807218143dc51..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-method-static-private-names.js +++ /dev/null @@ -1,66 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-after-same-line-method.template -/*--- -description: literal private names (field definitions after a method in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-computed-names.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-computed-names.js index e6c23736e82c7bb2854bb62a2f7f5348a08480c2..2a66b8ee761e88e0701dd35dbf317980c59580a2 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-computed-names.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; var C = class { - static async *m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + static async *m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -39,16 +39,6 @@ verifyProperty(C, "m", { writable: true, }, {restore: true}); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-static-computed-names.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-static-computed-names.js deleted file mode 100644 index ed5ebb9125eb2bf40422d6b7d2ee40f7f1b8a990..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-static-computed-names.js +++ /dev/null @@ -1,60 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template -/*--- -description: Static Computed property names (field definitions after a static async generator in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - static async *m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - -C.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-static-computed-symbol-names.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-static-computed-symbol-names.js deleted file mode 100644 index f14ea7dc83544dc60bbdabe15e2d9dd3b9c3e9af..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-static-computed-symbol-names.js +++ /dev/null @@ -1,74 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template -/*--- -description: Static computed property symbol names (field definitions after a static async generator in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - static async *m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); - -C.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-static-literal-names.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-static-literal-names.js deleted file mode 100644 index c536ba476091b3998cbbbfa2a018400701857501..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-static-literal-names.js +++ /dev/null @@ -1,77 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template -/*--- -description: Static literal property names (field definitions after a static async generator in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - static async *m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - - -C.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-static-private-names.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-static-private-names.js deleted file mode 100644 index 7d535ac73f2825eef834492c511d89aedf89801e..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-static-private-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template -/*--- -description: literal private names (field definitions after a static async generator in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - static async *m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); - -C.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-computed-names.js b/test/language/expressions/class/fields-after-same-line-static-async-method-computed-names.js index 8788d21cd69508c8166308dcc6b06346af130503..e39f9c059d682f6e67bff4cdf970d459672d4eff 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-computed-names.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; var C = class { - static async m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + static async m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -39,16 +39,6 @@ verifyProperty(C, "m", { writable: true, }, {restore: true}); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-static-computed-names.js b/test/language/expressions/class/fields-after-same-line-static-async-method-static-computed-names.js deleted file mode 100644 index 9eeea582748253c2ac05f7a37f90032361ad82a8..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-static-computed-names.js +++ /dev/null @@ -1,59 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template -/*--- -description: Static Computed property names (field definitions after a static async method in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - static async m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - -C.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-static-computed-symbol-names.js b/test/language/expressions/class/fields-after-same-line-static-async-method-static-computed-symbol-names.js deleted file mode 100644 index 3b0d1ff8627d1eca6224a164df65b66cff07fc89..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-static-computed-symbol-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template -/*--- -description: Static computed property symbol names (field definitions after a static async method in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - static async m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); - -C.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-static-literal-names.js b/test/language/expressions/class/fields-after-same-line-static-async-method-static-literal-names.js deleted file mode 100644 index b75f15606303b5d66133a0204566ca9a791eb75a..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-static-literal-names.js +++ /dev/null @@ -1,76 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template -/*--- -description: Static literal property names (field definitions after a static async method in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - static async m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - - -C.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-static-private-names.js b/test/language/expressions/class/fields-after-same-line-static-async-method-static-private-names.js deleted file mode 100644 index 5efb076bfeddb1ae764d05f2d8019928ecb752ac..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-static-private-names.js +++ /dev/null @@ -1,69 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template -/*--- -description: literal private names (field definitions after a static async method in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - static async m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); - -C.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-computed-names.js b/test/language/expressions/class/fields-after-same-line-static-gen-computed-names.js index 90cb11590631e3da27b67c8cb34f5257dfaa74d8..4f3cf3e5346f8de6eea865b8a49396c4f5bcc639 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-computed-names.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; var C = class { - static *m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + static *m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -40,16 +40,6 @@ verifyProperty(C, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-static-computed-names.js b/test/language/expressions/class/fields-after-same-line-static-gen-static-computed-names.js deleted file mode 100644 index d16244fc58cf5f1a8489ddf41d455dd7e199863c..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-gen-static-computed-names.js +++ /dev/null @@ -1,56 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template -/*--- -description: Static Computed property names (field definitions after a static generator in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - static *m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(C.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-static-computed-symbol-names.js b/test/language/expressions/class/fields-after-same-line-static-gen-static-computed-symbol-names.js deleted file mode 100644 index 40e7e890148798a4de519f130a2a64abbf920d4a..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-gen-static-computed-symbol-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template -/*--- -description: Static computed property symbol names (field definitions after a static generator in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - static *m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(C.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-static-literal-names.js b/test/language/expressions/class/fields-after-same-line-static-gen-static-literal-names.js deleted file mode 100644 index 68d70716ddcea5a2513b2afa777f3d6551f4913d..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-gen-static-literal-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template -/*--- -description: Static literal property names (field definitions after a static generator in the same line) -esid: prod-FieldDefinition -features: [generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - static *m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(C.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-static-private-names.js b/test/language/expressions/class/fields-after-same-line-static-gen-static-private-names.js deleted file mode 100644 index 03c13aff6a63b79536d2145503822c9afffbf8b8..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-gen-static-private-names.js +++ /dev/null @@ -1,66 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template -/*--- -description: literal private names (field definitions after a static generator in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - static *m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(C.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/expressions/class/fields-after-same-line-static-method-computed-names.js b/test/language/expressions/class/fields-after-same-line-static-method-computed-names.js index 14055957b6ea28f407cd3e819d8ecbdc3d32aa4c..66eb3d09897b0c4afba46a9847e3bb3a2aa5cfbb 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-computed-names.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; var C = class { - static m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + static m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -40,16 +40,6 @@ verifyProperty(C, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-after-same-line-static-method-static-computed-names.js b/test/language/expressions/class/fields-after-same-line-static-method-static-computed-names.js deleted file mode 100644 index a7af9730f5ee8a41cabbc05cb79e9afe5295a1e9..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-method-static-computed-names.js +++ /dev/null @@ -1,56 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-method.template -/*--- -description: Static Computed property names (field definitions after a static method in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - static m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(C.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/expressions/class/fields-after-same-line-static-method-static-computed-symbol-names.js b/test/language/expressions/class/fields-after-same-line-static-method-static-computed-symbol-names.js deleted file mode 100644 index 5e87b7760626ccf17b84916569b243e278df9ab2..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-method-static-computed-symbol-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-method.template -/*--- -description: Static computed property symbol names (field definitions after a static method in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - static m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(C.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/expressions/class/fields-after-same-line-static-method-static-literal-names.js b/test/language/expressions/class/fields-after-same-line-static-method-static-literal-names.js deleted file mode 100644 index 49df93079280e3fa1a597200bcbf7c1b032f31dc..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-method-static-literal-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-method.template -/*--- -description: Static literal property names (field definitions after a static method in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - static m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(C.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/expressions/class/fields-after-same-line-static-method-static-private-names.js b/test/language/expressions/class/fields-after-same-line-static-method-static-private-names.js deleted file mode 100644 index 5d189f0ee2accc046ef29d4c5e3b28023b0d113b..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-after-same-line-static-method-static-private-names.js +++ /dev/null @@ -1,66 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-after-same-line-static-method.template -/*--- -description: literal private names (field definitions after a static method in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - static m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(C.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/expressions/class/fields-computed-name-toprimitive-symbol.js b/test/language/expressions/class/fields-computed-name-toprimitive-symbol.js index b5091ccf8ba45d18660424ba4ed8b35e2aecad63..c9437b784d76c4bbcba4c11691228d2b4e2c59bf 100644 --- a/test/language/expressions/class/fields-computed-name-toprimitive-symbol.js +++ b/test/language/expressions/class/fields-computed-name-toprimitive-symbol.js @@ -24,9 +24,6 @@ info: | Runtime Semantics: ClassElementEvaluation - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - ClassElement: FieldDefinition; Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. diff --git a/test/language/expressions/class/fields-computed-name-toprimitive.js b/test/language/expressions/class/fields-computed-name-toprimitive.js index d31d76da0b5a62a8db885f71818c7c9c11752a62..7329aa9b8f051b098d05d5b68aef5f4ed04e48f9 100644 --- a/test/language/expressions/class/fields-computed-name-toprimitive.js +++ b/test/language/expressions/class/fields-computed-name-toprimitive.js @@ -24,9 +24,6 @@ info: | Runtime Semantics: ClassElementEvaluation - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - ClassElement: FieldDefinition; Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. diff --git a/test/language/expressions/class/fields-computed-variable-name-static-propname-constructor.js b/test/language/expressions/class/fields-computed-variable-name-static-propname-constructor.js deleted file mode 100644 index b0926b084c7414c841b6a6a01fd37992367f0122..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-computed-variable-name-static-propname-constructor.js +++ /dev/null @@ -1,33 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-propname-constructor.case -// - src/class-fields/propname-error-static/cls-expr-static-variable-name.template -/*--- -description: static class field forbid PropName 'constructor' (no early error -- PropName of ComputedPropertyName not forbidden value) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -info: | - Static Semantics: PropName - ... - ComputedPropertyName : [ AssignmentExpression ] - Return empty. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : staticFieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". - ----*/ - - -var constructor = 'foo'; -var C = class { - static [constructor]; -}; - -assert.sameValue(C.hasOwnProperty("foo"), true); - -var c = new C(); -assert.sameValue(c.hasOwnProperty("foo"), false); diff --git a/test/language/expressions/class/fields-computed-variable-name-static-propname-prototype.js b/test/language/expressions/class/fields-computed-variable-name-static-propname-prototype.js deleted file mode 100644 index dfd2688c6154b5378475217be9090fd0a4a01916..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-computed-variable-name-static-propname-prototype.js +++ /dev/null @@ -1,33 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-propname-prototype.case -// - src/class-fields/propname-error-static/cls-expr-static-variable-name.template -/*--- -description: static class fields forbid PropName 'prototype' (no early error -- PropName of ComputedPropertyName not forbidden value) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -info: | - Static Semantics: PropName - ... - ComputedPropertyName : [ AssignmentExpression ] - Return empty. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : staticFieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". - ----*/ - - -var prototype = 'foo'; -var C = class { - static [prototype]; -}; - -assert.sameValue(C.hasOwnProperty("foo"), true); - -var c = new C(); -assert.sameValue(c.hasOwnProperty("foo"), false); diff --git a/test/language/expressions/class/fields-evaluation-error-computed-name-referenceerror.js b/test/language/expressions/class/fields-evaluation-error-computed-name-referenceerror.js index 55b8903ef20a75ef021c5bf12e370a684a8740a9..66a6c1432602db0271f762a2883c3ba39fd8b58c 100644 --- a/test/language/expressions/class/fields-evaluation-error-computed-name-referenceerror.js +++ b/test/language/expressions/class/fields-evaluation-error-computed-name-referenceerror.js @@ -23,9 +23,6 @@ info: | Runtime Semantics: ClassElementEvaluation - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - ClassElement: FieldDefinition; Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. diff --git a/test/language/expressions/class/fields-evaluation-error-computed-name-toprimitive-err.js b/test/language/expressions/class/fields-evaluation-error-computed-name-toprimitive-err.js index 022302ffe86aa6847a9f538a08259641afaf6f48..0522c255923bb1bb597f16818181a20b447657dc 100644 --- a/test/language/expressions/class/fields-evaluation-error-computed-name-toprimitive-err.js +++ b/test/language/expressions/class/fields-evaluation-error-computed-name-toprimitive-err.js @@ -23,9 +23,6 @@ info: | Runtime Semantics: ClassElementEvaluation - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - ClassElement: FieldDefinition; Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. diff --git a/test/language/expressions/class/fields-evaluation-error-computed-name-tostring-err.js b/test/language/expressions/class/fields-evaluation-error-computed-name-tostring-err.js index a62a628be0a39ec3ce95e63798d2adda26aca3ae..cecb9de93890f9e737e266047fcd809a1bc6fe4e 100644 --- a/test/language/expressions/class/fields-evaluation-error-computed-name-tostring-err.js +++ b/test/language/expressions/class/fields-evaluation-error-computed-name-tostring-err.js @@ -23,9 +23,6 @@ info: | Runtime Semantics: ClassElementEvaluation - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - ClassElement: FieldDefinition; Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. diff --git a/test/language/expressions/class/fields-evaluation-error-computed-name-valueof-err.js b/test/language/expressions/class/fields-evaluation-error-computed-name-valueof-err.js index 70cf9c1a42c7d956c059730114289137b98abb30..f709947c115e03ae15fbd448163d7fb948c7e312 100644 --- a/test/language/expressions/class/fields-evaluation-error-computed-name-valueof-err.js +++ b/test/language/expressions/class/fields-evaluation-error-computed-name-valueof-err.js @@ -23,9 +23,6 @@ info: | Runtime Semantics: ClassElementEvaluation - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - ClassElement: FieldDefinition; Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. diff --git a/test/language/expressions/class/fields-init-value-incremental.js b/test/language/expressions/class/fields-init-value-incremental.js index f2d9cc5b5d1611413ee34a98a76f32b8b303929d..b2b87b99246db6b1a1be12732526d9cce5dac19c 100644 --- a/test/language/expressions/class/fields-init-value-incremental.js +++ b/test/language/expressions/class/fields-init-value-incremental.js @@ -28,56 +28,40 @@ info: | ... ---*/ -var x = 0; +var x = 1; var C = class { - static [x++] = x++; [x++] = x++; - static [x++] = x++; [x++] = x++; } var c1 = new C(); var c2 = new C(); -verifyProperty(C, "0", { - value: 4, - enumerable: true, - configurable: true, - writable: true, -}); - -verifyProperty(C, "2", { - value: 5, - enumerable: true, - configurable: true, - writable: true, -}); - verifyProperty(c1, "1", { - value: 6, + value: 3, enumerable: true, configurable: true, writable: true, }); -verifyProperty(c1, "3", { - value: 7, +verifyProperty(c1, "2", { + value: 4, enumerable: true, configurable: true, writable: true, }); verifyProperty(c2, "1", { - value: 8, + value: 5, enumerable: true, configurable: true, writable: true, }); -verifyProperty(c2, "3", { - value: 9, +verifyProperty(c2, "2", { + value: 6, enumerable: true, configurable: true, writable: true, diff --git a/test/language/expressions/class/fields-literal-name-static-propname-constructor.js b/test/language/expressions/class/fields-literal-name-static-propname-constructor.js deleted file mode 100644 index 68f53fa6b91cb72c53fb25395c9aa59e3c91d53d..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-literal-name-static-propname-constructor.js +++ /dev/null @@ -1,31 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-propname-constructor.case -// - src/class-fields/propname-error-static/cls-expr-static-literal-name.template -/*--- -description: static class field forbid PropName 'constructor' (early error -- PropName of IdentifierName is forbidden) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: PropName - LiteralPropertyName : IdentifierName - Return StringValue of IdentifierName. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : staticFieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - static constructor; -}; diff --git a/test/language/expressions/class/fields-literal-name-static-propname-prototype.js b/test/language/expressions/class/fields-literal-name-static-propname-prototype.js deleted file mode 100644 index eeae36ff86496a33af1170126de8a4f08a0716b5..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-literal-name-static-propname-prototype.js +++ /dev/null @@ -1,31 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-propname-prototype.case -// - src/class-fields/propname-error-static/cls-expr-static-literal-name.template -/*--- -description: static class fields forbid PropName 'prototype' (early error -- PropName of IdentifierName is forbidden) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: PropName - LiteralPropertyName : IdentifierName - Return StringValue of IdentifierName. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : staticFieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - static prototype; -}; diff --git a/test/language/expressions/class/fields-multiple-definitions-computed-names.js b/test/language/expressions/class/fields-multiple-definitions-computed-names.js index 8ed1b87597ef5946122959e63e79bf6ecd78e6b4..a2ee0a53a3aeef0b43cf35af6c5d90308461abbb 100644 --- a/test/language/expressions/class/fields-multiple-definitions-computed-names.js +++ b/test/language/expressions/class/fields-multiple-definitions-computed-names.js @@ -26,7 +26,7 @@ var x = "b"; var C = class { foo = "foobar"; m() { return 42 } - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"] + [x] = 42; [10] = "meep"; ["not initialized"] m2() { return 39 } bar = "barbaz"; @@ -76,16 +76,6 @@ verifyProperty(c, "bar", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-multiple-definitions-static-computed-names.js b/test/language/expressions/class/fields-multiple-definitions-static-computed-names.js deleted file mode 100644 index 92ef982b740f13e9fb0fe6b1aa4cea10a4b2ab58..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-multiple-definitions-static-computed-names.js +++ /dev/null @@ -1,92 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-multiple-definitions.template -/*--- -description: Static Computed property names (multiple fields definitions) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - foo = "foobar"; - m() { return 42 } - static ["a"] = 42; ["a"] = 39 - m2() { return 39 } - bar = "barbaz"; - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.m2(), 39); -assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); -assert.sameValue(c.m2, C.prototype.m2); - -verifyProperty(C.prototype, "m2", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/expressions/class/fields-multiple-definitions-static-computed-symbol-names.js b/test/language/expressions/class/fields-multiple-definitions-static-computed-symbol-names.js deleted file mode 100644 index 65e1141c14fb93ec1acf6459f5dc75af7781e390..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-multiple-definitions-static-computed-symbol-names.js +++ /dev/null @@ -1,106 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-multiple-definitions.template -/*--- -description: Static computed property symbol names (multiple fields definitions) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - foo = "foobar"; - m() { return 42 } - static [x]; static [y] = 42 - m2() { return 39 } - bar = "barbaz"; - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.m2(), 39); -assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); -assert.sameValue(c.m2, C.prototype.m2); - -verifyProperty(C.prototype, "m2", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/expressions/class/fields-multiple-definitions-static-literal-names.js b/test/language/expressions/class/fields-multiple-definitions-static-literal-names.js deleted file mode 100644 index 84a77a9fa87f982464222976ec283b08b354f70b..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-multiple-definitions-static-literal-names.js +++ /dev/null @@ -1,109 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-multiple-definitions.template -/*--- -description: Static literal property names (multiple fields definitions) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - foo = "foobar"; - m() { return 42 } - static a; b = 42; - static c = fn - m2() { return 39 } - bar = "barbaz"; - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.m2(), 39); -assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); -assert.sameValue(c.m2, C.prototype.m2); - -verifyProperty(C.prototype, "m2", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/expressions/class/fields-multiple-definitions-static-private-names.js b/test/language/expressions/class/fields-multiple-definitions-static-private-names.js deleted file mode 100644 index 569bf4009feb9f51c99d6c32296afe575d002d30..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-multiple-definitions-static-private-names.js +++ /dev/null @@ -1,102 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-multiple-definitions.template -/*--- -description: literal private names (multiple fields definitions) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - foo = "foobar"; - m() { return 42 } - static #x; static #y - m2() { return 39 } - bar = "barbaz"; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.m2(), 39); -assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); -assert.sameValue(c.m2, C.prototype.m2); - -verifyProperty(C.prototype, "m2", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-computed-names.js b/test/language/expressions/class/fields-multiple-stacked-definitions-computed-names.js index d9e10fc185080be96a1211d8e836e4a231d4ca03..fb384b137657a11b47a01834a695ce0d0ca4ef21 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-computed-names.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; var C = class { - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"] + [x] = 42; [10] = "meep"; ["not initialized"] foo = "foobar" bar = "barbaz"; @@ -54,16 +54,6 @@ verifyProperty(c, "bar", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-static-computed-names.js b/test/language/expressions/class/fields-multiple-stacked-definitions-static-computed-names.js deleted file mode 100644 index 9e68617be1ac359eb3a11021fecd7492973f9cad..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-static-computed-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template -/*--- -description: Static Computed property names (multiple stacked fields definitions through ASI) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - static ["a"] = 42; ["a"] = 39 - foo = "foobar" - bar = "barbaz"; - -} - -var c = new C(); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-static-computed-symbol-names.js b/test/language/expressions/class/fields-multiple-stacked-definitions-static-computed-symbol-names.js deleted file mode 100644 index c994b78a6fc0dcfab73aeaffad89347c92dd202f..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-static-computed-symbol-names.js +++ /dev/null @@ -1,84 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template -/*--- -description: Static computed property symbol names (multiple stacked fields definitions through ASI) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - static [x]; static [y] = 42 - foo = "foobar" - bar = "barbaz"; - -} - -var c = new C(); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-static-literal-names.js b/test/language/expressions/class/fields-multiple-stacked-definitions-static-literal-names.js deleted file mode 100644 index 6219861ca64dc1c6c95be440e02408c461340d6e..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-static-literal-names.js +++ /dev/null @@ -1,87 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template -/*--- -description: Static literal property names (multiple stacked fields definitions through ASI) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - static a; b = 42; - static c = fn - foo = "foobar" - bar = "barbaz"; - -} - -var c = new C(); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-static-private-names.js b/test/language/expressions/class/fields-multiple-stacked-definitions-static-private-names.js deleted file mode 100644 index 21318d79cbc0ccf604ad79f4b4b2b6cb8778b37e..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-static-private-names.js +++ /dev/null @@ -1,80 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template -/*--- -description: literal private names (multiple stacked fields definitions through ASI) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - static #x; static #y - foo = "foobar" - bar = "barbaz"; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-computed-names.js b/test/language/expressions/class/fields-new-no-sc-line-method-computed-names.js index e8113932c1d4bc5c5a88dc6029f63dcb6d6229f2..50538a5deaba2edb776321a400b6885a5ab33dba 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-computed-names.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; var C = class { - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"] + [x] = 42; [10] = "meep"; ["not initialized"] m() { return 42; } } @@ -41,16 +41,6 @@ verifyProperty(C.prototype, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-static-computed-names.js b/test/language/expressions/class/fields-new-no-sc-line-method-static-computed-names.js deleted file mode 100644 index 464a71538d6b63fff196615ceb378883683be500..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-new-no-sc-line-method-static-computed-names.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template -/*--- -description: Static Computed property names (field definitions followed by a method in a new line without a semicolon) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - static ["a"] = 42; ["a"] = 39 - m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-static-computed-symbol-names.js b/test/language/expressions/class/fields-new-no-sc-line-method-static-computed-symbol-names.js deleted file mode 100644 index c1a27011cc38e18096567e2cfa9c0b30db80fe31..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-new-no-sc-line-method-static-computed-symbol-names.js +++ /dev/null @@ -1,71 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template -/*--- -description: Static computed property symbol names (field definitions followed by a method in a new line without a semicolon) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - static [x]; static [y] = 42 - m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-static-literal-names.js b/test/language/expressions/class/fields-new-no-sc-line-method-static-literal-names.js deleted file mode 100644 index 45e689f095f1b3b34e657a83de427b4629a9e8f6..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-new-no-sc-line-method-static-literal-names.js +++ /dev/null @@ -1,74 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template -/*--- -description: Static literal property names (field definitions followed by a method in a new line without a semicolon) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - static a; b = 42; - static c = fn - m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-static-private-names.js b/test/language/expressions/class/fields-new-no-sc-line-method-static-private-names.js deleted file mode 100644 index ab4a9d7acddd9a986343c14d7f83607ce1686d3f..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-new-no-sc-line-method-static-private-names.js +++ /dev/null @@ -1,67 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template -/*--- -description: literal private names (field definitions followed by a method in a new line without a semicolon) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - static #x; static #y - m() { return 42; } -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/expressions/class/fields-new-sc-line-gen-computed-names.js b/test/language/expressions/class/fields-new-sc-line-gen-computed-names.js index 645cffcce42163d76a639d38efb0aceff90457f7..5d1e910a381c2e77c92423767b614ef31ac5f86a 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-computed-names.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; var C = class { - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + [x] = 42; [10] = "meep"; ["not initialized"]; *m() { return 42; } } @@ -41,16 +41,6 @@ verifyProperty(C.prototype, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-new-sc-line-gen-static-computed-names.js b/test/language/expressions/class/fields-new-sc-line-gen-static-computed-names.js deleted file mode 100644 index d2f0dc95bcbba3c7d2fe047550c3427550efd794..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-new-sc-line-gen-static-computed-names.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-new-sc-line-generator.template -/*--- -description: Static Computed property names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - static ["a"] = 42; ["a"] = 39; - *m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/expressions/class/fields-new-sc-line-gen-static-computed-symbol-names.js b/test/language/expressions/class/fields-new-sc-line-gen-static-computed-symbol-names.js deleted file mode 100644 index 909736bc134fea38b79e52d1a49d619fa1897358..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-new-sc-line-gen-static-computed-symbol-names.js +++ /dev/null @@ -1,71 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-new-sc-line-generator.template -/*--- -description: Static computed property symbol names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - static [x]; static [y] = 42; - *m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/expressions/class/fields-new-sc-line-gen-static-literal-names.js b/test/language/expressions/class/fields-new-sc-line-gen-static-literal-names.js deleted file mode 100644 index ffaf1c5e196b9c56cad020baaa24eb1e24103fb0..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-new-sc-line-gen-static-literal-names.js +++ /dev/null @@ -1,74 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-new-sc-line-generator.template -/*--- -description: Static literal property names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - static a; b = 42; - static c = fn; - *m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/expressions/class/fields-new-sc-line-gen-static-private-names.js b/test/language/expressions/class/fields-new-sc-line-gen-static-private-names.js deleted file mode 100644 index e5db6f9d5bb647b43b05d06700026e2e88bd1d5e..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-new-sc-line-gen-static-private-names.js +++ /dev/null @@ -1,67 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-new-sc-line-generator.template -/*--- -description: literal private names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - static #x; static #y; - *m() { return 42; } -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/expressions/class/fields-new-sc-line-method-computed-names.js b/test/language/expressions/class/fields-new-sc-line-method-computed-names.js index 70f8062e6960cd5be000d5aac04141996c893cc5..37a17dee8f060d9f9552e4a5222cac1653828ace 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-computed-names.js +++ b/test/language/expressions/class/fields-new-sc-line-method-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; var C = class { - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + [x] = 42; [10] = "meep"; ["not initialized"]; m() { return 42; } } @@ -41,16 +41,6 @@ verifyProperty(C.prototype, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-new-sc-line-method-static-computed-names.js b/test/language/expressions/class/fields-new-sc-line-method-static-computed-names.js deleted file mode 100644 index a0ffe35ee5afc4cb7a0861ff26087d9d75e78201..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-new-sc-line-method-static-computed-names.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-new-sc-line-method.template -/*--- -description: Static Computed property names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - static ["a"] = 42; ["a"] = 39; - m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/expressions/class/fields-new-sc-line-method-static-computed-symbol-names.js b/test/language/expressions/class/fields-new-sc-line-method-static-computed-symbol-names.js deleted file mode 100644 index 04c6e69d497c5045e877e970d7749636a3696016..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-new-sc-line-method-static-computed-symbol-names.js +++ /dev/null @@ -1,71 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-new-sc-line-method.template -/*--- -description: Static computed property symbol names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - static [x]; static [y] = 42; - m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/expressions/class/fields-new-sc-line-method-static-literal-names.js b/test/language/expressions/class/fields-new-sc-line-method-static-literal-names.js deleted file mode 100644 index 93ca7e9f490088b86f3082b5603bc6f607803e72..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-new-sc-line-method-static-literal-names.js +++ /dev/null @@ -1,74 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-new-sc-line-method.template -/*--- -description: Static literal property names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - static a; b = 42; - static c = fn; - m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/expressions/class/fields-new-sc-line-method-static-private-names.js b/test/language/expressions/class/fields-new-sc-line-method-static-private-names.js deleted file mode 100644 index 12b45da237f32b922f59bb7fe938ee57b8cba904..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-new-sc-line-method-static-private-names.js +++ /dev/null @@ -1,67 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-new-sc-line-method.template -/*--- -description: literal private names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - static #x; static #y; - m() { return 42; } -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/expressions/class/fields-regular-definitions-computed-names.js b/test/language/expressions/class/fields-regular-definitions-computed-names.js index 8b59a90cbab23ba480e70ddec972962ed769bc56..fc724d59d055222393bd2b32b590e96d193c7d94 100644 --- a/test/language/expressions/class/fields-regular-definitions-computed-names.js +++ b/test/language/expressions/class/fields-regular-definitions-computed-names.js @@ -24,22 +24,12 @@ var x = "b"; var C = class { - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"] + [x] = 42; [10] = "meep"; ["not initialized"] } var c = new C(); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-regular-definitions-static-computed-names.js b/test/language/expressions/class/fields-regular-definitions-static-computed-names.js deleted file mode 100644 index d2ccde7dabfddc8a29670dfd7589c791d106ebb8..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-regular-definitions-static-computed-names.js +++ /dev/null @@ -1,46 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-regular-definitions.template -/*--- -description: Static Computed property names (regular fields defintion) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - static ["a"] = 42; ["a"] = 39 - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/expressions/class/fields-regular-definitions-static-computed-symbol-names.js b/test/language/expressions/class/fields-regular-definitions-static-computed-symbol-names.js deleted file mode 100644 index c6048d94bc5027c9914247fafaf79dc03689d885..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-regular-definitions-static-computed-symbol-names.js +++ /dev/null @@ -1,60 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-regular-definitions.template -/*--- -description: Static computed property symbol names (regular fields defintion) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - static [x]; static [y] = 42 - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/expressions/class/fields-regular-definitions-static-literal-names.js b/test/language/expressions/class/fields-regular-definitions-static-literal-names.js deleted file mode 100644 index 8881f62da91b8a78bce3c96afe2cf1ba293a6469..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-regular-definitions-static-literal-names.js +++ /dev/null @@ -1,63 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-regular-definitions.template -/*--- -description: Static literal property names (regular fields defintion) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - static a; b = 42; - static c = fn - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/expressions/class/fields-regular-definitions-static-private-names.js b/test/language/expressions/class/fields-regular-definitions-static-private-names.js deleted file mode 100644 index ca118a4844db811900af57913b0624779cdd6616..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-regular-definitions-static-private-names.js +++ /dev/null @@ -1,55 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-regular-definitions.template -/*--- -description: literal private names (regular fields defintion) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - static #x; static #y -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/expressions/class/fields-same-line-async-gen-computed-names.js b/test/language/expressions/class/fields-same-line-async-gen-computed-names.js index 527601afad15d8f690462d24b0225a793f8c7b38..d312f9c70d2751f98ce714b94d8f4d422ea741d6 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-computed-names.js +++ b/test/language/expressions/class/fields-same-line-async-gen-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; var C = class { - async *m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + async *m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -39,16 +39,6 @@ verifyProperty(C.prototype, "m", { writable: true, }, {restore: true}); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-same-line-async-gen-static-computed-names.js b/test/language/expressions/class/fields-same-line-async-gen-static-computed-names.js deleted file mode 100644 index 854b7f0dd0c5b4479f4dc89f2190259732d2e2a0..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-async-gen-static-computed-names.js +++ /dev/null @@ -1,60 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template -/*--- -description: Static Computed property names (field definitions after an async generator in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - async *m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - -c.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-static-computed-symbol-names.js b/test/language/expressions/class/fields-same-line-async-gen-static-computed-symbol-names.js deleted file mode 100644 index ea307cbfd1117b5c8839cbbcabc737fe3767fcda..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-async-gen-static-computed-symbol-names.js +++ /dev/null @@ -1,74 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template -/*--- -description: Static computed property symbol names (field definitions after an async generator in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - async *m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); - -c.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-static-literal-names.js b/test/language/expressions/class/fields-same-line-async-gen-static-literal-names.js deleted file mode 100644 index ec1e03715bccfb37f5a76905d22ec8aa3e32988d..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-async-gen-static-literal-names.js +++ /dev/null @@ -1,77 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template -/*--- -description: Static literal property names (field definitions after an async generator in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - async *m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - - -c.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-static-private-names.js b/test/language/expressions/class/fields-same-line-async-gen-static-private-names.js deleted file mode 100644 index 228f0842bcdd937e229b7f0fadf4ab81ad61181d..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-async-gen-static-private-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template -/*--- -description: literal private names (field definitions after an async generator in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - async *m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); - -c.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-computed-names.js b/test/language/expressions/class/fields-same-line-async-method-computed-names.js index 0de78443c74cef934ed7c6ac66a6662ceb930309..82031be527f80c7e1f397981705f9a540d7607db 100644 --- a/test/language/expressions/class/fields-same-line-async-method-computed-names.js +++ b/test/language/expressions/class/fields-same-line-async-method-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; var C = class { - async m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + async m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -39,16 +39,6 @@ verifyProperty(C.prototype, "m", { writable: true, }, {restore: true}); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-same-line-async-method-static-computed-names.js b/test/language/expressions/class/fields-same-line-async-method-static-computed-names.js deleted file mode 100644 index 6ae4cc7ff9a53c3bb41fc6bc4257458da41732b7..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-async-method-static-computed-names.js +++ /dev/null @@ -1,59 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-after-same-line-async-method.template -/*--- -description: Static Computed property names (field definitions after an async method in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - async m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - -c.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-static-computed-symbol-names.js b/test/language/expressions/class/fields-same-line-async-method-static-computed-symbol-names.js deleted file mode 100644 index 1852562e0843ac520de8f4fe1ac5b8de78e65dd7..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-async-method-static-computed-symbol-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-after-same-line-async-method.template -/*--- -description: Static computed property symbol names (field definitions after an async method in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - async m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); - -c.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-static-literal-names.js b/test/language/expressions/class/fields-same-line-async-method-static-literal-names.js deleted file mode 100644 index 411244ffd358d024c40ed0f9a511cca6aa6724ec..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-async-method-static-literal-names.js +++ /dev/null @@ -1,76 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-after-same-line-async-method.template -/*--- -description: Static literal property names (field definitions after an async method in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - async m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - - -c.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-static-private-names.js b/test/language/expressions/class/fields-same-line-async-method-static-private-names.js deleted file mode 100644 index 688e0d1ff85536e251ff40250f2e609ba2e3debe..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-async-method-static-private-names.js +++ /dev/null @@ -1,69 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-after-same-line-async-method.template -/*--- -description: literal private names (field definitions after an async method in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - async m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); - -c.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-gen-computed-names.js b/test/language/expressions/class/fields-same-line-gen-computed-names.js index 3306f8e5c228982ab5d1bd1e372790311ef1743e..3f9e73ae98cbaae462fead7236841a14fe07bf38 100644 --- a/test/language/expressions/class/fields-same-line-gen-computed-names.js +++ b/test/language/expressions/class/fields-same-line-gen-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; var C = class { - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; *m() { return 42; } + [x] = 42; [10] = "meep"; ["not initialized"]; *m() { return 42; } } @@ -40,16 +40,6 @@ verifyProperty(C.prototype, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-same-line-gen-static-computed-names.js b/test/language/expressions/class/fields-same-line-gen-static-computed-names.js deleted file mode 100644 index c420802c9a49268a819c1fe40697746fe4153ba6..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-gen-static-computed-names.js +++ /dev/null @@ -1,56 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-same-line-generator.template -/*--- -description: Static Computed property names (field definitions followed by a generator method in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - static ["a"] = 42; ["a"] = 39; *m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/expressions/class/fields-same-line-gen-static-computed-symbol-names.js b/test/language/expressions/class/fields-same-line-gen-static-computed-symbol-names.js deleted file mode 100644 index 9f8d294a33f6f4984be9082208af6cf6d0cf3021..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-gen-static-computed-symbol-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-same-line-generator.template -/*--- -description: Static computed property symbol names (field definitions followed by a generator method in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - static [x]; static [y] = 42; *m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/expressions/class/fields-same-line-gen-static-literal-names.js b/test/language/expressions/class/fields-same-line-gen-static-literal-names.js deleted file mode 100644 index 1d767235b2299a6e8a7159e67c8e323616661bc5..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-gen-static-literal-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-same-line-generator.template -/*--- -description: Static literal property names (field definitions followed by a generator method in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - static a; b = 42; - static c = fn; *m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/expressions/class/fields-same-line-gen-static-private-names.js b/test/language/expressions/class/fields-same-line-gen-static-private-names.js deleted file mode 100644 index 6d6b79f91081b9c8bf759881dd75029a60bb32af..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-gen-static-private-names.js +++ /dev/null @@ -1,66 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-same-line-generator.template -/*--- -description: literal private names (field definitions followed by a generator method in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - static #x; static #y; *m() { return 42; } -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/expressions/class/fields-same-line-method-computed-names.js b/test/language/expressions/class/fields-same-line-method-computed-names.js index f59805772645bf9e1fc55893b17750899562690d..eb626db479695dc73dcdd9ddfea03cb5ad648cf4 100644 --- a/test/language/expressions/class/fields-same-line-method-computed-names.js +++ b/test/language/expressions/class/fields-same-line-method-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; var C = class { - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; m() { return 42; } + [x] = 42; [10] = "meep"; ["not initialized"]; m() { return 42; } } @@ -40,16 +40,6 @@ verifyProperty(C.prototype, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-same-line-method-static-computed-names.js b/test/language/expressions/class/fields-same-line-method-static-computed-names.js deleted file mode 100644 index 1cdb285ce91ec671579917f9adcc81b961ead9bb..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-method-static-computed-names.js +++ /dev/null @@ -1,56 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-same-line-method.template -/*--- -description: Static Computed property names (field definitions followed by a method in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - static ["a"] = 42; ["a"] = 39; m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/expressions/class/fields-same-line-method-static-computed-symbol-names.js b/test/language/expressions/class/fields-same-line-method-static-computed-symbol-names.js deleted file mode 100644 index b385bd8cc3191e24e5cd0eb5d3f1a1df7fabebd2..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-method-static-computed-symbol-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-same-line-method.template -/*--- -description: Static computed property symbol names (field definitions followed by a method in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - static [x]; static [y] = 42; m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/expressions/class/fields-same-line-method-static-literal-names.js b/test/language/expressions/class/fields-same-line-method-static-literal-names.js deleted file mode 100644 index 5f89385b7cd8a33209921b7b673d0e5fd28bd139..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-method-static-literal-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-same-line-method.template -/*--- -description: Static literal property names (field definitions followed by a method in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - static a; b = 42; - static c = fn; m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/expressions/class/fields-same-line-method-static-private-names.js b/test/language/expressions/class/fields-same-line-method-static-private-names.js deleted file mode 100644 index 1dd63147e591631c2fc8fab859d2558ac3a5629f..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-same-line-method-static-private-names.js +++ /dev/null @@ -1,66 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-same-line-method.template -/*--- -description: literal private names (field definitions followed by a method in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - static #x; static #y; m() { return 42; } -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/expressions/class/fields-static-comp-name-init-err-contains-arguments.js b/test/language/expressions/class/fields-static-comp-name-init-err-contains-arguments.js deleted file mode 100644 index b844f22e120109fa7c157f9a65df16b95ee42b53..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-static-comp-name-init-err-contains-arguments.js +++ /dev/null @@ -1,35 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-arguments.case -// - src/class-fields/initializer-error/cls-expr-fields-static-comp-name.template -/*--- -description: Syntax error if `arguments` used in class field (static computed ClassElementName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if ContainsArguments of Initializer is true. - - Static Semantics: ContainsArguments - IdentifierReference : Identifier - - 1. If the StringValue of Identifier is "arguments", return true. - ... - For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var x = "string"; -var C = class { - static [x] = arguments; -} diff --git a/test/language/expressions/class/fields-static-comp-name-init-err-contains-super.js b/test/language/expressions/class/fields-static-comp-name-init-err-contains-super.js deleted file mode 100644 index d90ee31d6686c654bf13884e039db3f4318b2498..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-static-comp-name-init-err-contains-super.js +++ /dev/null @@ -1,28 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-super.case -// - src/class-fields/initializer-error/cls-expr-fields-static-comp-name.template -/*--- -description: Syntax error if `super()` used in class field (static computed ClassElementName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var x = "string"; -var C = class { - static [x] = super(); -} diff --git a/test/language/expressions/class/fields-static-computed-name-toprimitive-symbol.js b/test/language/expressions/class/fields-static-computed-name-toprimitive-symbol.js deleted file mode 100644 index b868295db8a7d9f31854ff2f67df2d7fe7e49392..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-static-computed-name-toprimitive-symbol.js +++ /dev/null @@ -1,105 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-name-toprimitive-symbol.case -// - src/class-fields/default/cls-expr.template -/*--- -description: ToPrimitive evaluation in the ComputedPropertyName (field definitions in a class expression) -esid: prod-FieldDefinition -features: [computed-property-names, Symbol.toPrimitive, Symbol, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - Runtime Semantics: ClassDefinitionEvaluation - - ... - 27. For each ClassElement e in order from elements - a. If IsStatic of me is false, then - i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false. - b. Else, - i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false. - c. If fields is an abrupt completion, then - i. Set the running execution context's LexicalEnvironment to lex. - ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment. - iii. Return Completion(status). - ... - - Runtime Semantics: ClassElementEvaluation - - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - - ClassElement: FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. - - Runtime Semantics: ClassFieldDefinitionEvaluation - With parameters isStatic and homeObject. - - 1. Let fieldName be the result of evaluating ClassElementName. - 2. ReturnIfAbrupt(fieldName). - ... - - Runtime Semantics: Evaluation - ComputedPropertyName: [ AssignmentExpression ] - - 1. Let exprValue be the result of evaluating AssignmentExpression. - 2. Let propName be ? GetValue(exprValue). - 3. Return ? ToPropertyKey(propName). - ----*/ -var s1 = Symbol(); -var s2 = Symbol(); -var s3 = Symbol(); -var err = function() { throw new Test262Error(); }; -var obj1 = { - [Symbol.toPrimitive]: function() { return s1; }, - toString: err, - valueOf: err -}; - -var obj2 = { - toString: function() { return s2; }, - valueOf: err -}; - -var obj3 = { - toString: undefined, - valueOf: function() { return s3; } -}; - - - -var C = class { - static [obj1] = 42; - static [obj2] = 43; - static [obj3] = 44; -} - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, s1), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, s2), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, s3), false); - -verifyProperty(C, s1, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(C, s2, { - value: 43, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(C, s3, { - value: 44, - enumerable: true, - writable: true, - configurable: true -}); - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, s1), false); -assert.sameValue(Object.hasOwnProperty.call(c, s2), false); -assert.sameValue(Object.hasOwnProperty.call(c, s3), false); diff --git a/test/language/expressions/class/fields-static-computed-name-toprimitive.js b/test/language/expressions/class/fields-static-computed-name-toprimitive.js deleted file mode 100644 index 542791039cd5a0e71f5f27e1eb0a255f1bac28ea..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-static-computed-name-toprimitive.js +++ /dev/null @@ -1,102 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-name-toprimitive.case -// - src/class-fields/default/cls-expr.template -/*--- -description: ToPrimitive evaluation in the ComputedPropertyName (field definitions in a class expression) -esid: prod-FieldDefinition -features: [computed-property-names, Symbol.toPrimitive, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - Runtime Semantics: ClassDefinitionEvaluation - - ... - 27. For each ClassElement e in order from elements - a. If IsStatic of me is false, then - i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false. - b. Else, - i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false. - c. If fields is an abrupt completion, then - i. Set the running execution context's LexicalEnvironment to lex. - ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment. - iii. Return Completion(status). - ... - - Runtime Semantics: ClassElementEvaluation - - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - - ClassElement: FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. - - Runtime Semantics: ClassFieldDefinitionEvaluation - With parameters isStatic and homeObject. - - 1. Let fieldName be the result of evaluating ClassElementName. - 2. ReturnIfAbrupt(fieldName). - ... - - Runtime Semantics: Evaluation - ComputedPropertyName: [ AssignmentExpression ] - - 1. Let exprValue be the result of evaluating AssignmentExpression. - 2. Let propName be ? GetValue(exprValue). - 3. Return ? ToPropertyKey(propName). - ----*/ -var err = function() { throw new Test262Error(); }; -var obj1 = { - [Symbol.toPrimitive]: function() { return "d"; }, - toString: err, - valueOf: err -}; - -var obj2 = { - toString: function() { return "e"; }, - valueOf: err -}; - -var obj3 = { - toString: undefined, - valueOf: function() { return "f"; } -}; - - - -var C = class { - static [obj1] = 42; - static [obj2] = 43; - static [obj3] = 44; -} - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "d"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "e"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "f"), false); - -verifyProperty(C, "d", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(C, "e", { - value: 43, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(C, "f", { - value: 44, - enumerable: true, - writable: true, - configurable: true -}); - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "d"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "e"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "f"), false); diff --git a/test/language/expressions/class/fields-static-literal-init-err-contains-arguments.js b/test/language/expressions/class/fields-static-literal-init-err-contains-arguments.js deleted file mode 100644 index f299e42c2600659e70426e945d2339800d25a170..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-static-literal-init-err-contains-arguments.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-arguments.case -// - src/class-fields/initializer-error/cls-expr-fields-static-literal-name.template -/*--- -description: Syntax error if `arguments` used in class field (static literal ClassElementName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if ContainsArguments of Initializer is true. - - Static Semantics: ContainsArguments - IdentifierReference : Identifier - - 1. If the StringValue of Identifier is "arguments", return true. - ... - For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - static x = arguments; -} diff --git a/test/language/expressions/class/fields-static-literal-init-err-contains-super.js b/test/language/expressions/class/fields-static-literal-init-err-contains-super.js deleted file mode 100644 index 97db70a41a3df968271d3f6b11580b43b75633d1..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-static-literal-init-err-contains-super.js +++ /dev/null @@ -1,27 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-super.case -// - src/class-fields/initializer-error/cls-expr-fields-static-literal-name.template -/*--- -description: Syntax error if `super()` used in class field (static literal ClassElementName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - static x = super(); -} diff --git a/test/language/expressions/class/fields-static-private-init-err-contains-arguments.js b/test/language/expressions/class/fields-static-private-init-err-contains-arguments.js deleted file mode 100644 index d98b9b0aaf0dbbf421ccf1b603d1766216f01dac..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-static-private-init-err-contains-arguments.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-arguments.case -// - src/class-fields/initializer-error/cls-expr-fields-static-private-name.template -/*--- -description: Syntax error if `arguments` used in class field (static PrivateName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public, class-fields-private] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if ContainsArguments of Initializer is true. - - Static Semantics: ContainsArguments - IdentifierReference : Identifier - - 1. If the StringValue of Identifier is "arguments", return true. - ... - For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - static #x = arguments; -} diff --git a/test/language/expressions/class/fields-static-private-init-err-contains-super.js b/test/language/expressions/class/fields-static-private-init-err-contains-super.js deleted file mode 100644 index 7a3fbfd5e8002d6ade5aad56e6c02d2ba1b50a40..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-static-private-init-err-contains-super.js +++ /dev/null @@ -1,27 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-super.case -// - src/class-fields/initializer-error/cls-expr-fields-static-private-name.template -/*--- -description: Syntax error if `super()` used in class field (static PrivateName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public, class-fields-private] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - static #x = super(); -} diff --git a/test/language/expressions/class/fields-static-redeclaration-symbol.js b/test/language/expressions/class/fields-static-redeclaration-symbol.js deleted file mode 100644 index c3aaa7bc308323d9f85fb4730f2ee15c33173acd..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-static-redeclaration-symbol.js +++ /dev/null @@ -1,50 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-redeclaration-symbol.case -// - src/class-fields/default/cls-expr.template -/*--- -description: Redeclaration of public static fields with the same name (field definitions in a class expression) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js, compareArray.js] -info: | - 2.13.2 Runtime Semantics: ClassDefinitionEvaluation - - ... - 30. Set the value of F's [[Fields]] internal slot to fieldRecords. - ... - 33. Let result be InitializeStaticFields(F). - - InitializeStaticFields(F) - - 3. Let fieldRecords be the value of F's [[Fields]] internal slot. - 4. For each item fieldRecord in order from fieldRecords, - a. If fieldRecord.[[static]] is true, then - i. Perform ? DefineField(F, fieldRecord). - ----*/ -var x = []; -var y = Symbol(); - - -var C = class { - static [y] = (x.push("a"), "old_value"); - static [y] = (x.push("b"), "same_value"); - static [y] = (x.push("c"), "same_value"); -} - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); - -verifyProperty(C, y, { - value: "same_value", - enumerable: true, - writable: true, - configurable: true -}); - -assert(compareArray(x, ["a", "b", "c"])); - -var c = new C(); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -assert(compareArray(x, ["a", "b", "c"]), "static fields are not redefined on class instatiation"); diff --git a/test/language/expressions/class/fields-static-redeclaration.js b/test/language/expressions/class/fields-static-redeclaration.js deleted file mode 100644 index 8d81f7f1dccba08c1cde10df8b9080e911d0b739..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-static-redeclaration.js +++ /dev/null @@ -1,50 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-redeclaration.case -// - src/class-fields/default/cls-expr.template -/*--- -description: Redeclaration of public static fields with the same name (field definitions in a class expression) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js, compareArray.js] -info: | - 2.13.2 Runtime Semantics: ClassDefinitionEvaluation - - ... - 30. Set the value of F's [[Fields]] internal slot to fieldRecords. - ... - 33. Let result be InitializeStaticFields(F). - - InitializeStaticFields(F) - - 3. Let fieldRecords be the value of F's [[Fields]] internal slot. - 4. For each item fieldRecord in order from fieldRecords, - a. If fieldRecord.[[static]] is true, then - i. Perform ? DefineField(F, fieldRecord). - ----*/ -var x = []; - - -var C = class { - static y = (x.push("a"), "old_value"); - static ["y"] = (x.push("b"), "another_value"); - static "y" = (x.push("c"), "same_value"); - static y = (x.push("d"), "same_value"); -} - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); - -verifyProperty(C, "y", { - value: "same_value", - enumerable: true, - writable: true, - configurable: true -}); - -assert(compareArray(x, ["a", "b", "c", "d"])); - -var c = new C(); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); - -assert(compareArray(x, ["a", "b", "c", "d"]), "static fields are not redefined on class instatiation"); diff --git a/test/language/expressions/class/fields-static-string-literal-name-init-err-contains-arguments.js b/test/language/expressions/class/fields-static-string-literal-name-init-err-contains-arguments.js deleted file mode 100644 index d4d736ef9b49d07fc52e1cbddabda5f16a320746..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-static-string-literal-name-init-err-contains-arguments.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-arguments.case -// - src/class-fields/initializer-error/cls-expr-fields-static-string-literal-name.template -/*--- -description: Syntax error if `arguments` used in class field (static string literal ClassElementName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if ContainsArguments of Initializer is true. - - Static Semantics: ContainsArguments - IdentifierReference : Identifier - - 1. If the StringValue of Identifier is "arguments", return true. - ... - For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - static 'x' = arguments; -} diff --git a/test/language/expressions/class/fields-static-string-literal-name-init-err-contains-super.js b/test/language/expressions/class/fields-static-string-literal-name-init-err-contains-super.js deleted file mode 100644 index ed46f9eb9d4607c81149fb1e2be14ffe5b369b39..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-static-string-literal-name-init-err-contains-super.js +++ /dev/null @@ -1,27 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-super.case -// - src/class-fields/initializer-error/cls-expr-fields-static-string-literal-name.template -/*--- -description: Syntax error if `super()` used in class field (static string literal ClassElementName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - static 'x' = super(); -} diff --git a/test/language/expressions/class/fields-string-name-static-propname-constructor.js b/test/language/expressions/class/fields-string-name-static-propname-constructor.js deleted file mode 100644 index ba3d61da945ff49c7d1765b5b8fa09f3e6348a83..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-string-name-static-propname-constructor.js +++ /dev/null @@ -1,32 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-propname-constructor.case -// - src/class-fields/propname-error-static/cls-expr-static-string-name.template -/*--- -description: static class field forbid PropName 'constructor' (early error -- PropName of StringLiteral is forbidden) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: PropName - ... - LiteralPropertyName : StringLiteral - Return the String value whose code units are the SV of the StringLiteral. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : staticFieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - static 'constructor'; -}; diff --git a/test/language/expressions/class/fields-string-name-static-propname-prototype.js b/test/language/expressions/class/fields-string-name-static-propname-prototype.js deleted file mode 100644 index 318366aaec1e8091891b7b74896894a5fcd8b010..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-string-name-static-propname-prototype.js +++ /dev/null @@ -1,32 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-propname-prototype.case -// - src/class-fields/propname-error-static/cls-expr-static-string-name.template -/*--- -description: static class fields forbid PropName 'prototype' (early error -- PropName of StringLiteral is forbidden) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: PropName - ... - LiteralPropertyName : StringLiteral - Return the String value whose code units are the SV of the StringLiteral. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : staticFieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - static 'prototype'; -}; diff --git a/test/language/expressions/class/fields-wrapped-in-sc-computed-names.js b/test/language/expressions/class/fields-wrapped-in-sc-computed-names.js index 657f2afece7a8cf0e90b3ef16815ecd8552f633d..607437f8f757321e85cf2e39573d917fbe7285ed 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-computed-names.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-computed-names.js @@ -25,23 +25,13 @@ var x = "b"; var C = class { ;;;; - ;;;;;;static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];;;;;;; + ;;;;;;[x] = 42; [10] = "meep"; ["not initialized"];;;;;;; ;;;; } var c = new C(); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/expressions/class/fields-wrapped-in-sc-static-computed-names.js b/test/language/expressions/class/fields-wrapped-in-sc-static-computed-names.js deleted file mode 100644 index 36c6fa44a3cfa531d4dc9c3297907dd56e8cd0dc..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-wrapped-in-sc-static-computed-names.js +++ /dev/null @@ -1,48 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-expr-wrapped-in-sc.template -/*--- -description: Static Computed property names (fields definition wrapped in semicolons) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -var C = class { - ;;;; - ;;;;;;static ["a"] = 42; ["a"] = 39;;;;;;; - ;;;; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/expressions/class/fields-wrapped-in-sc-static-computed-symbol-names.js b/test/language/expressions/class/fields-wrapped-in-sc-static-computed-symbol-names.js deleted file mode 100644 index 1f93f5e6de26981a7666afbd03e53b1e7fd3ebf1..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-wrapped-in-sc-static-computed-symbol-names.js +++ /dev/null @@ -1,62 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-expr-wrapped-in-sc.template -/*--- -description: Static computed property symbol names (fields definition wrapped in semicolons) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -var C = class { - ;;;; - ;;;;;;static [x]; static [y] = 42;;;;;;; - ;;;; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/expressions/class/fields-wrapped-in-sc-static-literal-names.js b/test/language/expressions/class/fields-wrapped-in-sc-static-literal-names.js deleted file mode 100644 index c88ad83d6f787fb83ee60cc27570b7e321558ec3..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-wrapped-in-sc-static-literal-names.js +++ /dev/null @@ -1,65 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-expr-wrapped-in-sc.template -/*--- -description: Static literal property names (fields definition wrapped in semicolons) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -var C = class { - ;;;; - ;;;;;;static a; b = 42; - static c = fn;;;;;;; - ;;;; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/expressions/class/fields-wrapped-in-sc-static-private-names.js b/test/language/expressions/class/fields-wrapped-in-sc-static-private-names.js deleted file mode 100644 index 95b15414313d6ab4d58f644eab517d276671ee4a..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-wrapped-in-sc-static-private-names.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-expr-wrapped-in-sc.template -/*--- -description: literal private names (fields definition wrapped in semicolons) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -var C = class { - ;;;; - ;;;;;;static #x; static #y;;;;;;; - ;;;; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/statements/class/fields-after-same-line-gen-computed-names.js b/test/language/statements/class/fields-after-same-line-gen-computed-names.js index 15d1dc96798149ed319dfdbf498d1498d8a96d0f..e7634a16bf9a0a3daaa94c5e2b81e5fa7a005e71 100644 --- a/test/language/statements/class/fields-after-same-line-gen-computed-names.js +++ b/test/language/statements/class/fields-after-same-line-gen-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; class C { - *m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + *m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -40,16 +40,6 @@ verifyProperty(C.prototype, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-after-same-line-gen-static-computed-names.js b/test/language/statements/class/fields-after-same-line-gen-static-computed-names.js deleted file mode 100644 index f89aeb9e00337d5f8fbcfad6877f72b448b75a88..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-gen-static-computed-names.js +++ /dev/null @@ -1,56 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-after-same-line-gen.template -/*--- -description: Static Computed property names (field definitions after a generator in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - *m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/statements/class/fields-after-same-line-gen-static-computed-symbol-names.js b/test/language/statements/class/fields-after-same-line-gen-static-computed-symbol-names.js deleted file mode 100644 index 5229e5dd46c19b5c0d2f14ad22400df89694f3b7..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-gen-static-computed-symbol-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-after-same-line-gen.template -/*--- -description: Static computed property symbol names (field definitions after a generator in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - *m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/statements/class/fields-after-same-line-gen-static-literal-names.js b/test/language/statements/class/fields-after-same-line-gen-static-literal-names.js deleted file mode 100644 index def6e69bb0dc8698c0785e3d323683fd09cf18e4..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-gen-static-literal-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-after-same-line-gen.template -/*--- -description: Static literal property names (field definitions after a generator in the same line) -esid: prod-FieldDefinition -features: [generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - *m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/statements/class/fields-after-same-line-gen-static-private-names.js b/test/language/statements/class/fields-after-same-line-gen-static-private-names.js deleted file mode 100644 index adce1dd110e9c5b9f87ee1234dd107c44bad80bf..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-gen-static-private-names.js +++ /dev/null @@ -1,66 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-after-same-line-gen.template -/*--- -description: literal private names (field definitions after a generator in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - *m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/statements/class/fields-after-same-line-method-computed-names.js b/test/language/statements/class/fields-after-same-line-method-computed-names.js index fba7b3b901f7facc75588f964777f4b8112a4f73..21fb3b86d77e2daab9963919d02641877d1d4fbc 100644 --- a/test/language/statements/class/fields-after-same-line-method-computed-names.js +++ b/test/language/statements/class/fields-after-same-line-method-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; class C { - m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -40,16 +40,6 @@ verifyProperty(C.prototype, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-after-same-line-method-static-computed-names.js b/test/language/statements/class/fields-after-same-line-method-static-computed-names.js deleted file mode 100644 index 70ee22cf6d32f177af58badb0e75fb158bfffe14..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-method-static-computed-names.js +++ /dev/null @@ -1,56 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-after-same-line-method.template -/*--- -description: Static Computed property names (field definitions after a method in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/statements/class/fields-after-same-line-method-static-computed-symbol-names.js b/test/language/statements/class/fields-after-same-line-method-static-computed-symbol-names.js deleted file mode 100644 index 81ddcbb97c009397b07d406e18db6227539b2762..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-method-static-computed-symbol-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-after-same-line-method.template -/*--- -description: Static computed property symbol names (field definitions after a method in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/statements/class/fields-after-same-line-method-static-literal-names.js b/test/language/statements/class/fields-after-same-line-method-static-literal-names.js deleted file mode 100644 index e332e3db76629ef3bae10bc8ac97ee49d8104331..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-method-static-literal-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-after-same-line-method.template -/*--- -description: Static literal property names (field definitions after a method in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/statements/class/fields-after-same-line-method-static-private-names.js b/test/language/statements/class/fields-after-same-line-method-static-private-names.js deleted file mode 100644 index 5b2048a262e51c8b3a08c43622320e478b32db33..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-method-static-private-names.js +++ /dev/null @@ -1,66 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-after-same-line-method.template -/*--- -description: literal private names (field definitions after a method in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-computed-names.js b/test/language/statements/class/fields-after-same-line-static-async-gen-computed-names.js index ddb34df44af43b0694ebbae861308ea0cfb1f153..5554b63e9b4d6067544d3aafa2bf7752502fcb0d 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-computed-names.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; class C { - static async *m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + static async *m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -39,16 +39,6 @@ verifyProperty(C, "m", { writable: true, }, {restore: true}); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-static-computed-names.js b/test/language/statements/class/fields-after-same-line-static-async-gen-static-computed-names.js deleted file mode 100644 index 3a138b2cecdbd0aa4c947dec2610ff5578f6de87..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-static-computed-names.js +++ /dev/null @@ -1,60 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template -/*--- -description: Static Computed property names (field definitions after a static async generator in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - static async *m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - -C.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-static-computed-symbol-names.js b/test/language/statements/class/fields-after-same-line-static-async-gen-static-computed-symbol-names.js deleted file mode 100644 index 988264b0e66fd219d4765b918f0ee5f8471a74f1..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-static-computed-symbol-names.js +++ /dev/null @@ -1,74 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template -/*--- -description: Static computed property symbol names (field definitions after a static async generator in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - static async *m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); - -C.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-static-literal-names.js b/test/language/statements/class/fields-after-same-line-static-async-gen-static-literal-names.js deleted file mode 100644 index 1a8c253ddcc2a69deeac358add8966b151c4bb74..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-static-literal-names.js +++ /dev/null @@ -1,77 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template -/*--- -description: Static literal property names (field definitions after a static async generator in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - static async *m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - - -C.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-static-private-names.js b/test/language/statements/class/fields-after-same-line-static-async-gen-static-private-names.js deleted file mode 100644 index 6e7147238cd163089950d6472a74583ce204f65e..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-static-private-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template -/*--- -description: literal private names (field definitions after a static async generator in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - static async *m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); - -C.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-computed-names.js b/test/language/statements/class/fields-after-same-line-static-async-method-computed-names.js index f8a85cd330f2223ce7ca579338ed32454de856f8..34dfe534b0382dc74065efda94639593e29099da 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-computed-names.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; class C { - static async m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + static async m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -39,16 +39,6 @@ verifyProperty(C, "m", { writable: true, }, {restore: true}); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-static-computed-names.js b/test/language/statements/class/fields-after-same-line-static-async-method-static-computed-names.js deleted file mode 100644 index 852e2380f4bb28bc70c19f64789a675c38d867f3..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-async-method-static-computed-names.js +++ /dev/null @@ -1,59 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template -/*--- -description: Static Computed property names (field definitions after a static async method in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - static async m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - -C.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-static-computed-symbol-names.js b/test/language/statements/class/fields-after-same-line-static-async-method-static-computed-symbol-names.js deleted file mode 100644 index 0f8bad1a235a6aca50c22dc27dfcd371fe426853..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-async-method-static-computed-symbol-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template -/*--- -description: Static computed property symbol names (field definitions after a static async method in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - static async m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); - -C.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-static-literal-names.js b/test/language/statements/class/fields-after-same-line-static-async-method-static-literal-names.js deleted file mode 100644 index 60cfd6a14d18a0c1058f6e02c4d87cd72bca9e31..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-async-method-static-literal-names.js +++ /dev/null @@ -1,76 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template -/*--- -description: Static literal property names (field definitions after a static async method in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - static async m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - - -C.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-static-private-names.js b/test/language/statements/class/fields-after-same-line-static-async-method-static-private-names.js deleted file mode 100644 index 953e9a45696b59f3121655f4e17c21fba5a07371..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-async-method-static-private-names.js +++ /dev/null @@ -1,69 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template -/*--- -description: literal private names (field definitions after a static async method in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - static async m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); - -C.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-gen-computed-names.js b/test/language/statements/class/fields-after-same-line-static-gen-computed-names.js index f39b0629a62b28bbabc3c8b4ae0234f46c36970f..49e281bd7eafc0adb210710c936284233772d48c 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-computed-names.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; class C { - static *m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + static *m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -40,16 +40,6 @@ verifyProperty(C, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-after-same-line-static-gen-static-computed-names.js b/test/language/statements/class/fields-after-same-line-static-gen-static-computed-names.js deleted file mode 100644 index 2378057dccd2e2023538b6a1c31d791d714568b5..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-gen-static-computed-names.js +++ /dev/null @@ -1,56 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template -/*--- -description: Static Computed property names (field definitions after a static generator in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - static *m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(C.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/statements/class/fields-after-same-line-static-gen-static-computed-symbol-names.js b/test/language/statements/class/fields-after-same-line-static-gen-static-computed-symbol-names.js deleted file mode 100644 index b61d7eb57a896465faac88c6bb83e1c8f1a19a21..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-gen-static-computed-symbol-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template -/*--- -description: Static computed property symbol names (field definitions after a static generator in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - static *m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(C.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/statements/class/fields-after-same-line-static-gen-static-literal-names.js b/test/language/statements/class/fields-after-same-line-static-gen-static-literal-names.js deleted file mode 100644 index 0d05975b1f3216ab56f8e2056710de2c6712fb2d..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-gen-static-literal-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template -/*--- -description: Static literal property names (field definitions after a static generator in the same line) -esid: prod-FieldDefinition -features: [generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - static *m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(C.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/statements/class/fields-after-same-line-static-gen-static-private-names.js b/test/language/statements/class/fields-after-same-line-static-gen-static-private-names.js deleted file mode 100644 index 3e1f77fae1fa95415da7f08b981c81b41d9110c2..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-gen-static-private-names.js +++ /dev/null @@ -1,66 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template -/*--- -description: literal private names (field definitions after a static generator in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, generators, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - static *m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(C.m().next().value, 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/statements/class/fields-after-same-line-static-method-computed-names.js b/test/language/statements/class/fields-after-same-line-static-method-computed-names.js index bb655ff2e9b7431f25214dcd508eec1e2b05a619..8ee37ce11612c9a29665a93f9738069a32a3131f 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-computed-names.js +++ b/test/language/statements/class/fields-after-same-line-static-method-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; class C { - static m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + static m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -40,16 +40,6 @@ verifyProperty(C, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-after-same-line-static-method-static-computed-names.js b/test/language/statements/class/fields-after-same-line-static-method-static-computed-names.js deleted file mode 100644 index c08e3c3b0e8029a34cd1e4e4fe0e2f1e4c344759..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-method-static-computed-names.js +++ /dev/null @@ -1,56 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-method.template -/*--- -description: Static Computed property names (field definitions after a static method in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - static m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(C.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/statements/class/fields-after-same-line-static-method-static-computed-symbol-names.js b/test/language/statements/class/fields-after-same-line-static-method-static-computed-symbol-names.js deleted file mode 100644 index 532958a415c86c43261becdf7a9e158a4f2995a8..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-method-static-computed-symbol-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-method.template -/*--- -description: Static computed property symbol names (field definitions after a static method in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - static m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(C.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/statements/class/fields-after-same-line-static-method-static-literal-names.js b/test/language/statements/class/fields-after-same-line-static-method-static-literal-names.js deleted file mode 100644 index b2c7c6a7af82f65c2590b818986486e93b68677e..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-method-static-literal-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-method.template -/*--- -description: Static literal property names (field definitions after a static method in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - static m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(C.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/statements/class/fields-after-same-line-static-method-static-private-names.js b/test/language/statements/class/fields-after-same-line-static-method-static-private-names.js deleted file mode 100644 index 419ec93c8edf014f6280bc63b8999db17e6ec219..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-after-same-line-static-method-static-private-names.js +++ /dev/null @@ -1,66 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-after-same-line-static-method.template -/*--- -description: literal private names (field definitions after a static method in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - static m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(C.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); - -verifyProperty(C, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/statements/class/fields-comp-name-init-err-contains-arguments.js b/test/language/statements/class/fields-comp-name-init-err-contains-arguments.js deleted file mode 100644 index 5f931c9506ebd2f5a73d0b063b5a66febc1cfcc9..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-comp-name-init-err-contains-arguments.js +++ /dev/null @@ -1,35 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-arguments.case -// - src/class-fields/initializer-error/cls-decl-fields-comp-name.template -/*--- -description: Syntax error if `arguments` used in class field (computed ClassElementName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if ContainsArguments of Initializer is true. - - Static Semantics: ContainsArguments - IdentifierReference : Identifier - - 1. If the StringValue of Identifier is "arguments", return true. - ... - For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var x = "string"; -class C { - static [x] = arguments; -} diff --git a/test/language/statements/class/fields-comp-name-init-err-contains-super.js b/test/language/statements/class/fields-comp-name-init-err-contains-super.js deleted file mode 100644 index 00f28d5fcc5d46cff70d0d03a1682bbc6a016d74..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-comp-name-init-err-contains-super.js +++ /dev/null @@ -1,28 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-super.case -// - src/class-fields/initializer-error/cls-decl-fields-comp-name.template -/*--- -description: Syntax error if `super()` used in class field (computed ClassElementName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var x = "string"; -class C { - static [x] = super(); -} diff --git a/test/language/statements/class/fields-computed-name-toprimitive-symbol.js b/test/language/statements/class/fields-computed-name-toprimitive-symbol.js index a38db9e6657595ddf6f35d53d55113d758d3de26..5c9639bc9ecf2fb9938ac18fb0451d874304711d 100644 --- a/test/language/statements/class/fields-computed-name-toprimitive-symbol.js +++ b/test/language/statements/class/fields-computed-name-toprimitive-symbol.js @@ -24,9 +24,6 @@ info: | Runtime Semantics: ClassElementEvaluation - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - ClassElement: FieldDefinition; Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. diff --git a/test/language/statements/class/fields-computed-name-toprimitive.js b/test/language/statements/class/fields-computed-name-toprimitive.js index 67af44ede2848f10f85f9ef893cad2986d8c1afe..518f1f164df22a4e3e23980fc9bdcec79d32891a 100644 --- a/test/language/statements/class/fields-computed-name-toprimitive.js +++ b/test/language/statements/class/fields-computed-name-toprimitive.js @@ -24,9 +24,6 @@ info: | Runtime Semantics: ClassElementEvaluation - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - ClassElement: FieldDefinition; Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. diff --git a/test/language/statements/class/fields-computed-variable-name-static-propname-constructor.js b/test/language/statements/class/fields-computed-variable-name-static-propname-constructor.js deleted file mode 100644 index fc5515e52a8214da9c76ac15f098f8f2119771c2..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-computed-variable-name-static-propname-constructor.js +++ /dev/null @@ -1,33 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-propname-constructor.case -// - src/class-fields/propname-error-static/cls-decl-static-variable-name.template -/*--- -description: static class field forbid PropName 'constructor' (no early error -- PropName of ComputedPropertyName not forbidden value) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -info: | - Static Semantics: PropName - ... - ComputedPropertyName : [ AssignmentExpression ] - Return empty. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : staticFieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". - ----*/ - - -var constructor = "foo"; -class C { - static [constructor]; -} - -assert.sameValue(C.hasOwnProperty("foo"), true); - -var c = new C(); -assert.sameValue(c.hasOwnProperty("foo"), false); diff --git a/test/language/statements/class/fields-computed-variable-name-static-propname-prototype.js b/test/language/statements/class/fields-computed-variable-name-static-propname-prototype.js deleted file mode 100644 index 400efb97adaddcdead8684488fb48308437e6d67..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-computed-variable-name-static-propname-prototype.js +++ /dev/null @@ -1,33 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-propname-prototype.case -// - src/class-fields/propname-error-static/cls-decl-static-variable-name.template -/*--- -description: static class fields forbid PropName 'prototype' (no early error -- PropName of ComputedPropertyName not forbidden value) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -info: | - Static Semantics: PropName - ... - ComputedPropertyName : [ AssignmentExpression ] - Return empty. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : staticFieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". - ----*/ - - -var prototype = "foo"; -class C { - static [prototype]; -} - -assert.sameValue(C.hasOwnProperty("foo"), true); - -var c = new C(); -assert.sameValue(c.hasOwnProperty("foo"), false); diff --git a/test/language/statements/class/fields-evaluation-error-computed-name-referenceerror.js b/test/language/statements/class/fields-evaluation-error-computed-name-referenceerror.js index 43c01a9af2a44825c8d64d2850a14923f5529887..505de6f4b9b5ee373e2d0066109229ba8c57993f 100644 --- a/test/language/statements/class/fields-evaluation-error-computed-name-referenceerror.js +++ b/test/language/statements/class/fields-evaluation-error-computed-name-referenceerror.js @@ -23,9 +23,6 @@ info: | Runtime Semantics: ClassElementEvaluation - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - ClassElement: FieldDefinition; Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. diff --git a/test/language/statements/class/fields-evaluation-error-computed-name-toprimitive-err.js b/test/language/statements/class/fields-evaluation-error-computed-name-toprimitive-err.js index c839551e89eb51e8e2e1741a69eab366493310a6..77579a2f60f6aed9bea9bffd3862a51afc3003f8 100644 --- a/test/language/statements/class/fields-evaluation-error-computed-name-toprimitive-err.js +++ b/test/language/statements/class/fields-evaluation-error-computed-name-toprimitive-err.js @@ -23,9 +23,6 @@ info: | Runtime Semantics: ClassElementEvaluation - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - ClassElement: FieldDefinition; Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. diff --git a/test/language/statements/class/fields-evaluation-error-computed-name-tostring-err.js b/test/language/statements/class/fields-evaluation-error-computed-name-tostring-err.js index 6abf0cbbc208e37933cc072c0024fb2934988694..2edbc79dbe89655ef08aca1e468d92b3bb5cece8 100644 --- a/test/language/statements/class/fields-evaluation-error-computed-name-tostring-err.js +++ b/test/language/statements/class/fields-evaluation-error-computed-name-tostring-err.js @@ -23,9 +23,6 @@ info: | Runtime Semantics: ClassElementEvaluation - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - ClassElement: FieldDefinition; Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. diff --git a/test/language/statements/class/fields-evaluation-error-computed-name-valueof-err.js b/test/language/statements/class/fields-evaluation-error-computed-name-valueof-err.js index 663cf91cc5c5139e32087c303d824e63f4a06969..b056fb488ea2eed195a3cf69bddf5758cf845881 100644 --- a/test/language/statements/class/fields-evaluation-error-computed-name-valueof-err.js +++ b/test/language/statements/class/fields-evaluation-error-computed-name-valueof-err.js @@ -23,9 +23,6 @@ info: | Runtime Semantics: ClassElementEvaluation - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - ClassElement: FieldDefinition; Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. diff --git a/test/language/statements/class/fields-init-value-incremental.js b/test/language/statements/class/fields-init-value-incremental.js index 0195d25151998a885f888ad4319e5c46044b56cf..24d5eb3b6f52d21ec4f44ac178641b1e0473c201 100644 --- a/test/language/statements/class/fields-init-value-incremental.js +++ b/test/language/statements/class/fields-init-value-incremental.js @@ -28,56 +28,40 @@ info: | ... ---*/ -var x = 0; +var x = 1; class C { - static [x++] = x++; [x++] = x++; - static [x++] = x++; [x++] = x++; } var c1 = new C(); var c2 = new C(); -verifyProperty(C, "0", { - value: 4, - enumerable: true, - configurable: true, - writable: true, -}); - -verifyProperty(C, "2", { - value: 5, - enumerable: true, - configurable: true, - writable: true, -}); - verifyProperty(c1, "1", { - value: 6, + value: 3, enumerable: true, configurable: true, writable: true, }); -verifyProperty(c1, "3", { - value: 7, +verifyProperty(c1, "2", { + value: 4, enumerable: true, configurable: true, writable: true, }); verifyProperty(c2, "1", { - value: 8, + value: 5, enumerable: true, configurable: true, writable: true, }); -verifyProperty(c2, "3", { - value: 9, +verifyProperty(c2, "2", { + value: 6, enumerable: true, configurable: true, writable: true, diff --git a/test/language/statements/class/fields-literal-name-static-propname-constructor.js b/test/language/statements/class/fields-literal-name-static-propname-constructor.js deleted file mode 100644 index 2612862987c89a1276e3fe2cdcc2e31f48dc7d0a..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-literal-name-static-propname-constructor.js +++ /dev/null @@ -1,31 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-propname-constructor.case -// - src/class-fields/propname-error-static/cls-decl-static-literal-name.template -/*--- -description: static class field forbid PropName 'constructor' (early error -- PropName of IdentifierName is forbidden value) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: PropName - LiteralPropertyName : IdentifierName - Return StringValue of IdentifierName. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : staticFieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - static constructor; -} diff --git a/test/language/statements/class/fields-literal-name-static-propname-prototype.js b/test/language/statements/class/fields-literal-name-static-propname-prototype.js deleted file mode 100644 index 877609beaef8cab85d866d68cc15847b480aa94c..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-literal-name-static-propname-prototype.js +++ /dev/null @@ -1,31 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-propname-prototype.case -// - src/class-fields/propname-error-static/cls-decl-static-literal-name.template -/*--- -description: static class fields forbid PropName 'prototype' (early error -- PropName of IdentifierName is forbidden value) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: PropName - LiteralPropertyName : IdentifierName - Return StringValue of IdentifierName. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : staticFieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - static prototype; -} diff --git a/test/language/statements/class/fields-multiple-definitions-computed-names.js b/test/language/statements/class/fields-multiple-definitions-computed-names.js index 6d7b1c498914f9426b24db0b64d1bdb476480cfe..b6d3cfb14f91036892950f678a3e3dc12db7b68b 100644 --- a/test/language/statements/class/fields-multiple-definitions-computed-names.js +++ b/test/language/statements/class/fields-multiple-definitions-computed-names.js @@ -26,7 +26,7 @@ var x = "b"; class C { foo = "foobar"; m() { return 42 } - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"] + [x] = 42; [10] = "meep"; ["not initialized"] m2() { return 39 } bar = "barbaz"; @@ -76,16 +76,6 @@ verifyProperty(c, "bar", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-multiple-definitions-static-computed-names.js b/test/language/statements/class/fields-multiple-definitions-static-computed-names.js deleted file mode 100644 index 593e42cf51c596f8a3c8d4d2e1b8df63bc0ad879..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-multiple-definitions-static-computed-names.js +++ /dev/null @@ -1,92 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-multiple-definitions.template -/*--- -description: Static Computed property names (multiple fields definitions) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - foo = "foobar"; - m() { return 42 } - static ["a"] = 42; ["a"] = 39 - m2() { return 39 } - bar = "barbaz"; - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.m2(), 39); -assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); -assert.sameValue(c.m2, C.prototype.m2); - -verifyProperty(C.prototype, "m2", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/statements/class/fields-multiple-definitions-static-computed-symbol-names.js b/test/language/statements/class/fields-multiple-definitions-static-computed-symbol-names.js deleted file mode 100644 index d797f2e071c49b5a306f4112f076a8d27fecdfd7..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-multiple-definitions-static-computed-symbol-names.js +++ /dev/null @@ -1,106 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-multiple-definitions.template -/*--- -description: Static computed property symbol names (multiple fields definitions) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - foo = "foobar"; - m() { return 42 } - static [x]; static [y] = 42 - m2() { return 39 } - bar = "barbaz"; - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.m2(), 39); -assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); -assert.sameValue(c.m2, C.prototype.m2); - -verifyProperty(C.prototype, "m2", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/statements/class/fields-multiple-definitions-static-literal-names.js b/test/language/statements/class/fields-multiple-definitions-static-literal-names.js deleted file mode 100644 index 04c83de2c2607a4adb4ad3e03a8b629de7769442..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-multiple-definitions-static-literal-names.js +++ /dev/null @@ -1,109 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-multiple-definitions.template -/*--- -description: Static literal property names (multiple fields definitions) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - foo = "foobar"; - m() { return 42 } - static a; b = 42; - static c = fn - m2() { return 39 } - bar = "barbaz"; - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.m2(), 39); -assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); -assert.sameValue(c.m2, C.prototype.m2); - -verifyProperty(C.prototype, "m2", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/statements/class/fields-multiple-definitions-static-private-names.js b/test/language/statements/class/fields-multiple-definitions-static-private-names.js deleted file mode 100644 index f30c49aad70b6b71e669cbb944a4c156daa14ffe..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-multiple-definitions-static-private-names.js +++ /dev/null @@ -1,102 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-multiple-definitions.template -/*--- -description: literal private names (multiple fields definitions) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - foo = "foobar"; - m() { return 42 } - static #x; static #y - m2() { return 39 } - bar = "barbaz"; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.m2(), 39); -assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); -assert.sameValue(c.m2, C.prototype.m2); - -verifyProperty(C.prototype, "m2", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-computed-names.js b/test/language/statements/class/fields-multiple-stacked-definitions-computed-names.js index 69b0916c964b43a29db0abf471c77304b4b100f0..1bdcb8e773bbed01d1b1c6d82e794eb9fe030aa6 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-computed-names.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; class C { - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"] + [x] = 42; [10] = "meep"; ["not initialized"] foo = "foobar" bar = "barbaz"; @@ -54,16 +54,6 @@ verifyProperty(c, "bar", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-static-computed-names.js b/test/language/statements/class/fields-multiple-stacked-definitions-static-computed-names.js deleted file mode 100644 index a3e0748c5ee53721a8bb804a6bf487a5906ef2d5..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-multiple-stacked-definitions-static-computed-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template -/*--- -description: Static Computed property names (multiple stacked fields definitions through ASI) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - static ["a"] = 42; ["a"] = 39 - foo = "foobar" - bar = "barbaz"; - -} - -var c = new C(); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-static-computed-symbol-names.js b/test/language/statements/class/fields-multiple-stacked-definitions-static-computed-symbol-names.js deleted file mode 100644 index 0ebbb9b091b059537986d4d34b9ca47aee67097a..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-multiple-stacked-definitions-static-computed-symbol-names.js +++ /dev/null @@ -1,84 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template -/*--- -description: Static computed property symbol names (multiple stacked fields definitions through ASI) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - static [x]; static [y] = 42 - foo = "foobar" - bar = "barbaz"; - -} - -var c = new C(); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-static-literal-names.js b/test/language/statements/class/fields-multiple-stacked-definitions-static-literal-names.js deleted file mode 100644 index 9040bb149f5f05e5d102a5dc7be6108000c284ba..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-multiple-stacked-definitions-static-literal-names.js +++ /dev/null @@ -1,87 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template -/*--- -description: Static literal property names (multiple stacked fields definitions through ASI) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - static a; b = 42; - static c = fn - foo = "foobar" - bar = "barbaz"; - -} - -var c = new C(); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-static-private-names.js b/test/language/statements/class/fields-multiple-stacked-definitions-static-private-names.js deleted file mode 100644 index 3857f74bb98a181730b7f68795d2486eba4a09ec..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-multiple-stacked-definitions-static-private-names.js +++ /dev/null @@ -1,80 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template -/*--- -description: literal private names (multiple stacked fields definitions through ASI) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - static #x; static #y - foo = "foobar" - bar = "barbaz"; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.foo, "foobar"); -assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); - -verifyProperty(c, "foo", { - value: "foobar", - enumerable: true, - configurable: true, - writable: true, -}); - -assert.sameValue(c.bar, "barbaz"); -assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); - -verifyProperty(c, "bar", { - value: "barbaz", - enumerable: true, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/statements/class/fields-new-no-sc-line-method-computed-names.js b/test/language/statements/class/fields-new-no-sc-line-method-computed-names.js index 5d4f003d66504ee7155eac072987cd18ac3843c0..656dad2c1ae7f34ce473c62cc61023e554708578 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-computed-names.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; class C { - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"] + [x] = 42; [10] = "meep"; ["not initialized"] m() { return 42; } } @@ -41,16 +41,6 @@ verifyProperty(C.prototype, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-new-no-sc-line-method-static-computed-names.js b/test/language/statements/class/fields-new-no-sc-line-method-static-computed-names.js deleted file mode 100644 index 02514b3deb01bb389a4cbdaa87289318d3ec7bce..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-new-no-sc-line-method-static-computed-names.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template -/*--- -description: Static Computed property names (field definitions followed by a method in a new line without a semicolon) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - static ["a"] = 42; ["a"] = 39 - m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/statements/class/fields-new-no-sc-line-method-static-computed-symbol-names.js b/test/language/statements/class/fields-new-no-sc-line-method-static-computed-symbol-names.js deleted file mode 100644 index dd8a575a56b64fb4c7c626271b11f4c5648562f4..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-new-no-sc-line-method-static-computed-symbol-names.js +++ /dev/null @@ -1,71 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template -/*--- -description: Static computed property symbol names (field definitions followed by a method in a new line without a semicolon) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - static [x]; static [y] = 42 - m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/statements/class/fields-new-no-sc-line-method-static-literal-names.js b/test/language/statements/class/fields-new-no-sc-line-method-static-literal-names.js deleted file mode 100644 index 6ac9918faacdc1345bf20b7a8709c1dca2e077de..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-new-no-sc-line-method-static-literal-names.js +++ /dev/null @@ -1,74 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template -/*--- -description: Static literal property names (field definitions followed by a method in a new line without a semicolon) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - static a; b = 42; - static c = fn - m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/statements/class/fields-new-no-sc-line-method-static-private-names.js b/test/language/statements/class/fields-new-no-sc-line-method-static-private-names.js deleted file mode 100644 index c8b3485650a3a67a1375e83635ede3793c7caa34..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-new-no-sc-line-method-static-private-names.js +++ /dev/null @@ -1,67 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template -/*--- -description: literal private names (field definitions followed by a method in a new line without a semicolon) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - static #x; static #y - m() { return 42; } -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/statements/class/fields-new-sc-line-gen-computed-names.js b/test/language/statements/class/fields-new-sc-line-gen-computed-names.js index 4a4acdb9c865476ec9aefa1c7d06757d82bca493..ed18ea80b92eb719aa3a6eddb4aa96732bd353db 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-computed-names.js +++ b/test/language/statements/class/fields-new-sc-line-gen-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; class C { - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + [x] = 42; [10] = "meep"; ["not initialized"]; *m() { return 42; } } @@ -41,16 +41,6 @@ verifyProperty(C.prototype, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-new-sc-line-gen-static-computed-names.js b/test/language/statements/class/fields-new-sc-line-gen-static-computed-names.js deleted file mode 100644 index 2fd70234b0f316735c27b823bced688b96c4b095..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-new-sc-line-gen-static-computed-names.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-new-sc-line-generator.template -/*--- -description: Static Computed property names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - static ["a"] = 42; ["a"] = 39; - *m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/statements/class/fields-new-sc-line-gen-static-computed-symbol-names.js b/test/language/statements/class/fields-new-sc-line-gen-static-computed-symbol-names.js deleted file mode 100644 index 8b9ad5ae4ac76499cde110f2460db6b150951224..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-new-sc-line-gen-static-computed-symbol-names.js +++ /dev/null @@ -1,71 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-new-sc-line-generator.template -/*--- -description: Static computed property symbol names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - static [x]; static [y] = 42; - *m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/statements/class/fields-new-sc-line-gen-static-literal-names.js b/test/language/statements/class/fields-new-sc-line-gen-static-literal-names.js deleted file mode 100644 index 07dd8dd5f38a75f7ae98b3479395e184d4b34360..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-new-sc-line-gen-static-literal-names.js +++ /dev/null @@ -1,74 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-new-sc-line-generator.template -/*--- -description: Static literal property names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - static a; b = 42; - static c = fn; - *m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/statements/class/fields-new-sc-line-gen-static-private-names.js b/test/language/statements/class/fields-new-sc-line-gen-static-private-names.js deleted file mode 100644 index 45f9d18409e28b13be745996324485d761c4102c..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-new-sc-line-gen-static-private-names.js +++ /dev/null @@ -1,67 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-new-sc-line-generator.template -/*--- -description: literal private names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - static #x; static #y; - *m() { return 42; } -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/statements/class/fields-new-sc-line-method-computed-names.js b/test/language/statements/class/fields-new-sc-line-method-computed-names.js index 7c2520cb9c74933ce3b7afd8e85053913b14faec..a3055504f09d85f6aa8b1901fca160a5ff5ad19f 100644 --- a/test/language/statements/class/fields-new-sc-line-method-computed-names.js +++ b/test/language/statements/class/fields-new-sc-line-method-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; class C { - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + [x] = 42; [10] = "meep"; ["not initialized"]; m() { return 42; } } @@ -41,16 +41,6 @@ verifyProperty(C.prototype, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-new-sc-line-method-static-computed-names.js b/test/language/statements/class/fields-new-sc-line-method-static-computed-names.js deleted file mode 100644 index ffedc6cfe8612601d5f78687b768961d9e080eed..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-new-sc-line-method-static-computed-names.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-new-sc-line-method.template -/*--- -description: Static Computed property names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - static ["a"] = 42; ["a"] = 39; - m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/statements/class/fields-new-sc-line-method-static-computed-symbol-names.js b/test/language/statements/class/fields-new-sc-line-method-static-computed-symbol-names.js deleted file mode 100644 index 3e917bde62061703e633f5e2d7f8dfceb80e9b18..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-new-sc-line-method-static-computed-symbol-names.js +++ /dev/null @@ -1,71 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-new-sc-line-method.template -/*--- -description: Static computed property symbol names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - static [x]; static [y] = 42; - m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/statements/class/fields-new-sc-line-method-static-literal-names.js b/test/language/statements/class/fields-new-sc-line-method-static-literal-names.js deleted file mode 100644 index ac54f0d91dc05ce95a5133679261c20c6e6d8912..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-new-sc-line-method-static-literal-names.js +++ /dev/null @@ -1,74 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-new-sc-line-method.template -/*--- -description: Static literal property names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - static a; b = 42; - static c = fn; - m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/statements/class/fields-new-sc-line-method-static-private-names.js b/test/language/statements/class/fields-new-sc-line-method-static-private-names.js deleted file mode 100644 index 46079d45cc23a9d8702d7849c3d15c29948ffa5b..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-new-sc-line-method-static-private-names.js +++ /dev/null @@ -1,67 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-new-sc-line-method.template -/*--- -description: literal private names (field definitions followed by a method in a new line with a semicolon) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - static #x; static #y; - m() { return 42; } -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/statements/class/fields-regular-definitions-computed-names.js b/test/language/statements/class/fields-regular-definitions-computed-names.js index fcd8f2be2e773f5bc95f2e731749fd6bbca66772..7fa89ad9139fd3c785c700b69ed4f5de089c2d05 100644 --- a/test/language/statements/class/fields-regular-definitions-computed-names.js +++ b/test/language/statements/class/fields-regular-definitions-computed-names.js @@ -24,22 +24,12 @@ var x = "b"; class C { - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"] + [x] = 42; [10] = "meep"; ["not initialized"] } var c = new C(); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-regular-definitions-static-computed-names.js b/test/language/statements/class/fields-regular-definitions-static-computed-names.js deleted file mode 100644 index 87a80650e2f54cb210d953a7d35f074cccfd2a75..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-regular-definitions-static-computed-names.js +++ /dev/null @@ -1,46 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-regular-definitions.template -/*--- -description: Static Computed property names (regular fields defintion) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - static ["a"] = 42; ["a"] = 39 - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/statements/class/fields-regular-definitions-static-computed-symbol-names.js b/test/language/statements/class/fields-regular-definitions-static-computed-symbol-names.js deleted file mode 100644 index c9ab45887472c32b97cdd50427d50c49ccaa6a19..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-regular-definitions-static-computed-symbol-names.js +++ /dev/null @@ -1,60 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-regular-definitions.template -/*--- -description: Static computed property symbol names (regular fields defintion) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - static [x]; static [y] = 42 - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/statements/class/fields-regular-definitions-static-literal-names.js b/test/language/statements/class/fields-regular-definitions-static-literal-names.js deleted file mode 100644 index 74bea2f29ce1cd6606d9e2ea6630babc408512eb..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-regular-definitions-static-literal-names.js +++ /dev/null @@ -1,63 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-regular-definitions.template -/*--- -description: Static literal property names (regular fields defintion) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - static a; b = 42; - static c = fn - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/statements/class/fields-regular-definitions-static-private-names.js b/test/language/statements/class/fields-regular-definitions-static-private-names.js deleted file mode 100644 index fca552f0ba95c43544eb1ffadf922ee38a807614..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-regular-definitions-static-private-names.js +++ /dev/null @@ -1,55 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-regular-definitions.template -/*--- -description: literal private names (regular fields defintion) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - static #x; static #y -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/statements/class/fields-same-line-async-gen-computed-names.js b/test/language/statements/class/fields-same-line-async-gen-computed-names.js index 0d032a776ca0d7fd9432f9fe3e5adaa7ceac329d..7e8cf6520266b6b4947aef4b94c2f54aaca22373 100644 --- a/test/language/statements/class/fields-same-line-async-gen-computed-names.js +++ b/test/language/statements/class/fields-same-line-async-gen-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; class C { - async *m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + async *m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -39,16 +39,6 @@ verifyProperty(C.prototype, "m", { writable: true, }, {restore: true}); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-same-line-async-gen-static-computed-names.js b/test/language/statements/class/fields-same-line-async-gen-static-computed-names.js deleted file mode 100644 index 6f18630d2fd7a52373cc44f24a9657310ad0c549..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-async-gen-static-computed-names.js +++ /dev/null @@ -1,60 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template -/*--- -description: Static Computed property names (field definitions after an async generator in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - async *m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - -c.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-static-computed-symbol-names.js b/test/language/statements/class/fields-same-line-async-gen-static-computed-symbol-names.js deleted file mode 100644 index 54061a7f87a79578a6e1f57482d963b1094da718..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-async-gen-static-computed-symbol-names.js +++ /dev/null @@ -1,74 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template -/*--- -description: Static computed property symbol names (field definitions after an async generator in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - async *m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); - -c.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-static-literal-names.js b/test/language/statements/class/fields-same-line-async-gen-static-literal-names.js deleted file mode 100644 index 2040027f11c297d4f5d301d4acd9921d8fd22ee7..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-async-gen-static-literal-names.js +++ /dev/null @@ -1,77 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template -/*--- -description: Static literal property names (field definitions after an async generator in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - async *m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - - -c.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-static-private-names.js b/test/language/statements/class/fields-same-line-async-gen-static-private-names.js deleted file mode 100644 index a29c3e6ed74641d8b5d5e076d5187d226a2df427..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-async-gen-static-private-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template -/*--- -description: literal private names (field definitions after an async generator in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - async *m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); - -c.m().next().then(function(v) { - assert.sameValue(v.value, 42); - assert.sameValue(v.done, true); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-computed-names.js b/test/language/statements/class/fields-same-line-async-method-computed-names.js index 5f51ec0c592a1b349c5f50a8f327b0f05b6be6ed..ab68ccb314cd71e09df735bf462ae0b0a5215594 100644 --- a/test/language/statements/class/fields-same-line-async-method-computed-names.js +++ b/test/language/statements/class/fields-same-line-async-method-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; class C { - async m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; + async m() { return 42; } [x] = 42; [10] = "meep"; ["not initialized"]; } @@ -39,16 +39,6 @@ verifyProperty(C.prototype, "m", { writable: true, }, {restore: true}); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-same-line-async-method-static-computed-names.js b/test/language/statements/class/fields-same-line-async-method-static-computed-names.js deleted file mode 100644 index f4e8186062aea768c89fed7a1e0c052445126624..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-async-method-static-computed-names.js +++ /dev/null @@ -1,59 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-after-same-line-async-method.template -/*--- -description: Static Computed property names (field definitions after an async method in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - async m() { return 42; } static ["a"] = 42; ["a"] = 39; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - -c.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-static-computed-symbol-names.js b/test/language/statements/class/fields-same-line-async-method-static-computed-symbol-names.js deleted file mode 100644 index 82aeb6e7107292761685c989a8d9fe955d3d383a..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-async-method-static-computed-symbol-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-after-same-line-async-method.template -/*--- -description: Static computed property symbol names (field definitions after an async method in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - async m() { return 42; } static [x]; static [y] = 42; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); - -c.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-static-literal-names.js b/test/language/statements/class/fields-same-line-async-method-static-literal-names.js deleted file mode 100644 index 2208c8cfca784658f31ced0647ef5b76251596c5..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-async-method-static-literal-names.js +++ /dev/null @@ -1,76 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-after-same-line-async-method.template -/*--- -description: Static literal property names (field definitions after an async method in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - async m() { return 42; } static a; b = 42; - static c = fn; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - - -c.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-static-private-names.js b/test/language/statements/class/fields-same-line-async-method-static-private-names.js deleted file mode 100644 index 4361e512669c6c0966466ad445cf58bccd8c7954..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-async-method-static-private-names.js +++ /dev/null @@ -1,69 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-after-same-line-async-method.template -/*--- -description: literal private names (field definitions after an async method in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public, async-functions] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - async m() { return 42; } static #x; static #y; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); -assert.sameValue(c.m, C.prototype.m); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}, {restore: true}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); - -c.m().then(function(v) { - assert.sameValue(v, 42); -}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-gen-computed-names.js b/test/language/statements/class/fields-same-line-gen-computed-names.js index d46fc2aa29b2ea20aeb77ef6c873484d090a9d8f..bfd85d84ad782bb7cdd57a2ceb23d1146e1f3133 100644 --- a/test/language/statements/class/fields-same-line-gen-computed-names.js +++ b/test/language/statements/class/fields-same-line-gen-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; class C { - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; *m() { return 42; } + [x] = 42; [10] = "meep"; ["not initialized"]; *m() { return 42; } } @@ -40,16 +40,6 @@ verifyProperty(C.prototype, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-same-line-gen-static-computed-names.js b/test/language/statements/class/fields-same-line-gen-static-computed-names.js deleted file mode 100644 index 1e4b9d984117c5c3d2d277ad934c8760136fa71b..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-gen-static-computed-names.js +++ /dev/null @@ -1,56 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-same-line-generator.template -/*--- -description: Static Computed property names (field definitions followed by a generator method in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - static ["a"] = 42; ["a"] = 39; *m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/statements/class/fields-same-line-gen-static-computed-symbol-names.js b/test/language/statements/class/fields-same-line-gen-static-computed-symbol-names.js deleted file mode 100644 index 8c2d1b4e2c7aa386e01d024f1ef5825644b3197c..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-gen-static-computed-symbol-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-same-line-generator.template -/*--- -description: Static computed property symbol names (field definitions followed by a generator method in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - static [x]; static [y] = 42; *m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/statements/class/fields-same-line-gen-static-literal-names.js b/test/language/statements/class/fields-same-line-gen-static-literal-names.js deleted file mode 100644 index fc5215788683acff877bd479c8524689d0c9a73b..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-gen-static-literal-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-same-line-generator.template -/*--- -description: Static literal property names (field definitions followed by a generator method in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - static a; b = 42; - static c = fn; *m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/statements/class/fields-same-line-gen-static-private-names.js b/test/language/statements/class/fields-same-line-gen-static-private-names.js deleted file mode 100644 index 9ae9e69763d1e36f1a5b8139db0dfae651dfdc83..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-gen-static-private-names.js +++ /dev/null @@ -1,66 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-same-line-generator.template -/*--- -description: literal private names (field definitions followed by a generator method in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public, generators] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - static #x; static #y; *m() { return 42; } -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m().next().value, 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/statements/class/fields-same-line-method-computed-names.js b/test/language/statements/class/fields-same-line-method-computed-names.js index 7157e46e1885d79e0e453a16df161263c1563a11..b9b64e5424cb64d9c81e7eecbb0e02f75a936ee4 100644 --- a/test/language/statements/class/fields-same-line-method-computed-names.js +++ b/test/language/statements/class/fields-same-line-method-computed-names.js @@ -24,7 +24,7 @@ var x = "b"; class C { - static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; m() { return 42; } + [x] = 42; [10] = "meep"; ["not initialized"]; m() { return 42; } } @@ -40,16 +40,6 @@ verifyProperty(C.prototype, "m", { writable: true, }); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-same-line-method-static-computed-names.js b/test/language/statements/class/fields-same-line-method-static-computed-names.js deleted file mode 100644 index df4668a4f0922dff6fb01c3e4b1756b47c274514..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-method-static-computed-names.js +++ /dev/null @@ -1,56 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-same-line-method.template -/*--- -description: Static Computed property names (field definitions followed by a method in the same line) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - static ["a"] = 42; ["a"] = 39; m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/statements/class/fields-same-line-method-static-computed-symbol-names.js b/test/language/statements/class/fields-same-line-method-static-computed-symbol-names.js deleted file mode 100644 index 0c06e52cd56138dd4c31ec32b9e8b4fc9081836c..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-method-static-computed-symbol-names.js +++ /dev/null @@ -1,70 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-same-line-method.template -/*--- -description: Static computed property symbol names (field definitions followed by a method in the same line) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - static [x]; static [y] = 42; m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/statements/class/fields-same-line-method-static-literal-names.js b/test/language/statements/class/fields-same-line-method-static-literal-names.js deleted file mode 100644 index 63f6a707aad090a87a6771b0ab38ea0faa66ae08..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-method-static-literal-names.js +++ /dev/null @@ -1,73 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-same-line-method.template -/*--- -description: Static literal property names (field definitions followed by a method in the same line) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - static a; b = 42; - static c = fn; m() { return 42; } - -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/statements/class/fields-same-line-method-static-private-names.js b/test/language/statements/class/fields-same-line-method-static-private-names.js deleted file mode 100644 index 5e8af08e08415575ee1726c4cbde89c2be7cd71f..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-same-line-method-static-private-names.js +++ /dev/null @@ -1,66 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-same-line-method.template -/*--- -description: literal private names (field definitions followed by a method in the same line) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - static #x; static #y; m() { return 42; } -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -assert.sameValue(c.m(), 42); -assert.sameValue(c.m, C.prototype.m); -assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); - -verifyProperty(C.prototype, "m", { - enumerable: false, - configurable: true, - writable: true, -}); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10"); diff --git a/test/language/statements/class/fields-static-comp-name-init-err-contains-arguments.js b/test/language/statements/class/fields-static-comp-name-init-err-contains-arguments.js deleted file mode 100644 index 888651a8caa3e0cb6142543c9c6f34a9537c0d2f..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-static-comp-name-init-err-contains-arguments.js +++ /dev/null @@ -1,35 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-arguments.case -// - src/class-fields/initializer-error/cls-decl-fields-static-comp-name.template -/*--- -description: Syntax error if `arguments` used in class field (static computed ClassElementName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if ContainsArguments of Initializer is true. - - Static Semantics: ContainsArguments - IdentifierReference : Identifier - - 1. If the StringValue of Identifier is "arguments", return true. - ... - For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var x = "string"; -class C { - static [x] = arguments; -} diff --git a/test/language/statements/class/fields-static-comp-name-init-err-contains-super.js b/test/language/statements/class/fields-static-comp-name-init-err-contains-super.js deleted file mode 100644 index f2cbcf1b40902692e2487e657ffffd8a9df05826..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-static-comp-name-init-err-contains-super.js +++ /dev/null @@ -1,28 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-super.case -// - src/class-fields/initializer-error/cls-decl-fields-static-comp-name.template -/*--- -description: Syntax error if `super()` used in class field (static computed ClassElementName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var x = "string"; -class C { - static [x] = super(); -} diff --git a/test/language/statements/class/fields-static-computed-name-toprimitive-symbol.js b/test/language/statements/class/fields-static-computed-name-toprimitive-symbol.js deleted file mode 100644 index 4dc05f631e834e96e5ed4149915789f247388508..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-static-computed-name-toprimitive-symbol.js +++ /dev/null @@ -1,105 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-name-toprimitive-symbol.case -// - src/class-fields/default/cls-decl.template -/*--- -description: ToPrimitive evaluation in the ComputedPropertyName (field definitions in a class declaration) -esid: prod-FieldDefinition -features: [computed-property-names, Symbol.toPrimitive, Symbol, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - Runtime Semantics: ClassDefinitionEvaluation - - ... - 27. For each ClassElement e in order from elements - a. If IsStatic of me is false, then - i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false. - b. Else, - i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false. - c. If fields is an abrupt completion, then - i. Set the running execution context's LexicalEnvironment to lex. - ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment. - iii. Return Completion(status). - ... - - Runtime Semantics: ClassElementEvaluation - - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - - ClassElement: FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. - - Runtime Semantics: ClassFieldDefinitionEvaluation - With parameters isStatic and homeObject. - - 1. Let fieldName be the result of evaluating ClassElementName. - 2. ReturnIfAbrupt(fieldName). - ... - - Runtime Semantics: Evaluation - ComputedPropertyName: [ AssignmentExpression ] - - 1. Let exprValue be the result of evaluating AssignmentExpression. - 2. Let propName be ? GetValue(exprValue). - 3. Return ? ToPropertyKey(propName). - ----*/ -var s1 = Symbol(); -var s2 = Symbol(); -var s3 = Symbol(); -var err = function() { throw new Test262Error(); }; -var obj1 = { - [Symbol.toPrimitive]: function() { return s1; }, - toString: err, - valueOf: err -}; - -var obj2 = { - toString: function() { return s2; }, - valueOf: err -}; - -var obj3 = { - toString: undefined, - valueOf: function() { return s3; } -}; - - - -class C { - static [obj1] = 42; - static [obj2] = 43; - static [obj3] = 44; -} - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, s1), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, s2), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, s3), false); - -verifyProperty(C, s1, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(C, s2, { - value: 43, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(C, s3, { - value: 44, - enumerable: true, - writable: true, - configurable: true -}); - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, s1), false); -assert.sameValue(Object.hasOwnProperty.call(c, s2), false); -assert.sameValue(Object.hasOwnProperty.call(c, s3), false); diff --git a/test/language/statements/class/fields-static-computed-name-toprimitive.js b/test/language/statements/class/fields-static-computed-name-toprimitive.js deleted file mode 100644 index 9a98f4cf399cdcad3682bfcb1797ccfc674a7ce8..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-static-computed-name-toprimitive.js +++ /dev/null @@ -1,102 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-name-toprimitive.case -// - src/class-fields/default/cls-decl.template -/*--- -description: ToPrimitive evaluation in the ComputedPropertyName (field definitions in a class declaration) -esid: prod-FieldDefinition -features: [computed-property-names, Symbol.toPrimitive, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - Runtime Semantics: ClassDefinitionEvaluation - - ... - 27. For each ClassElement e in order from elements - a. If IsStatic of me is false, then - i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false. - b. Else, - i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false. - c. If fields is an abrupt completion, then - i. Set the running execution context's LexicalEnvironment to lex. - ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment. - iii. Return Completion(status). - ... - - Runtime Semantics: ClassElementEvaluation - - ClassElement: static FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object. - - ClassElement: FieldDefinition; - Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. - - Runtime Semantics: ClassFieldDefinitionEvaluation - With parameters isStatic and homeObject. - - 1. Let fieldName be the result of evaluating ClassElementName. - 2. ReturnIfAbrupt(fieldName). - ... - - Runtime Semantics: Evaluation - ComputedPropertyName: [ AssignmentExpression ] - - 1. Let exprValue be the result of evaluating AssignmentExpression. - 2. Let propName be ? GetValue(exprValue). - 3. Return ? ToPropertyKey(propName). - ----*/ -var err = function() { throw new Test262Error(); }; -var obj1 = { - [Symbol.toPrimitive]: function() { return "d"; }, - toString: err, - valueOf: err -}; - -var obj2 = { - toString: function() { return "e"; }, - valueOf: err -}; - -var obj3 = { - toString: undefined, - valueOf: function() { return "f"; } -}; - - - -class C { - static [obj1] = 42; - static [obj2] = 43; - static [obj3] = 44; -} - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "d"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "e"), false); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "f"), false); - -verifyProperty(C, "d", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(C, "e", { - value: 43, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(C, "f", { - value: 44, - enumerable: true, - writable: true, - configurable: true -}); - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(c, "d"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "e"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "f"), false); diff --git a/test/language/statements/class/fields-static-literal-init-err-contains-arguments.js b/test/language/statements/class/fields-static-literal-init-err-contains-arguments.js deleted file mode 100644 index 2ab39b2d26390c3b584d4025382321746bc03312..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-static-literal-init-err-contains-arguments.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-arguments.case -// - src/class-fields/initializer-error/cls-decl-fields-static-literal-name.template -/*--- -description: Syntax error if `arguments` used in class field (static literal ClassElementName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if ContainsArguments of Initializer is true. - - Static Semantics: ContainsArguments - IdentifierReference : Identifier - - 1. If the StringValue of Identifier is "arguments", return true. - ... - For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - static x = arguments; -} diff --git a/test/language/statements/class/fields-static-literal-init-err-contains-super.js b/test/language/statements/class/fields-static-literal-init-err-contains-super.js deleted file mode 100644 index 5cc75cff59e352a5fb7e77de1fab022be6f2b3e2..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-static-literal-init-err-contains-super.js +++ /dev/null @@ -1,27 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-super.case -// - src/class-fields/initializer-error/cls-decl-fields-static-literal-name.template -/*--- -description: Syntax error if `super()` used in class field (static literal ClassElementName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - static x = super(); -} diff --git a/test/language/statements/class/fields-static-private-init-err-contains-arguments.js b/test/language/statements/class/fields-static-private-init-err-contains-arguments.js deleted file mode 100644 index ce8be545b463cc91264719b1c50b1840cd626985..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-static-private-init-err-contains-arguments.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-arguments.case -// - src/class-fields/initializer-error/cls-decl-fields-static-private-name.template -/*--- -description: Syntax error if `arguments` used in class field (static PrivateName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public, class-fields-private] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if ContainsArguments of Initializer is true. - - Static Semantics: ContainsArguments - IdentifierReference : Identifier - - 1. If the StringValue of Identifier is "arguments", return true. - ... - For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - static #x = arguments; -} diff --git a/test/language/statements/class/fields-static-private-init-err-contains-super.js b/test/language/statements/class/fields-static-private-init-err-contains-super.js deleted file mode 100644 index d2f70f451a97d02c1ea34e024de2f30b936a72c6..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-static-private-init-err-contains-super.js +++ /dev/null @@ -1,27 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-super.case -// - src/class-fields/initializer-error/cls-decl-fields-static-private-name.template -/*--- -description: Syntax error if `super()` used in class field (static PrivateName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public, class-fields-private] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - static #x = super(); -} diff --git a/test/language/statements/class/fields-static-redeclaration-symbol.js b/test/language/statements/class/fields-static-redeclaration-symbol.js deleted file mode 100644 index 0b0b7eefe798ff0b6bcabf67398ef6394fdc496b..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-static-redeclaration-symbol.js +++ /dev/null @@ -1,50 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-redeclaration-symbol.case -// - src/class-fields/default/cls-decl.template -/*--- -description: Redeclaration of public static fields with the same name (field definitions in a class declaration) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js, compareArray.js] -info: | - 2.13.2 Runtime Semantics: ClassDefinitionEvaluation - - ... - 30. Set the value of F's [[Fields]] internal slot to fieldRecords. - ... - 33. Let result be InitializeStaticFields(F). - - InitializeStaticFields(F) - - 3. Let fieldRecords be the value of F's [[Fields]] internal slot. - 4. For each item fieldRecord in order from fieldRecords, - a. If fieldRecord.[[static]] is true, then - i. Perform ? DefineField(F, fieldRecord). - ----*/ -var x = []; -var y = Symbol(); - - -class C { - static [y] = (x.push("a"), "old_value"); - static [y] = (x.push("b"), "same_value"); - static [y] = (x.push("c"), "same_value"); -} - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); - -verifyProperty(C, y, { - value: "same_value", - enumerable: true, - writable: true, - configurable: true -}); - -assert(compareArray(x, ["a", "b", "c"])); - -var c = new C(); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -assert(compareArray(x, ["a", "b", "c"]), "static fields are not redefined on class instatiation"); diff --git a/test/language/statements/class/fields-static-redeclaration.js b/test/language/statements/class/fields-static-redeclaration.js deleted file mode 100644 index 26d592b667da4776851c3f15638dbdfcc4576278..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-static-redeclaration.js +++ /dev/null @@ -1,50 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-redeclaration.case -// - src/class-fields/default/cls-decl.template -/*--- -description: Redeclaration of public static fields with the same name (field definitions in a class declaration) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js, compareArray.js] -info: | - 2.13.2 Runtime Semantics: ClassDefinitionEvaluation - - ... - 30. Set the value of F's [[Fields]] internal slot to fieldRecords. - ... - 33. Let result be InitializeStaticFields(F). - - InitializeStaticFields(F) - - 3. Let fieldRecords be the value of F's [[Fields]] internal slot. - 4. For each item fieldRecord in order from fieldRecords, - a. If fieldRecord.[[static]] is true, then - i. Perform ? DefineField(F, fieldRecord). - ----*/ -var x = []; - - -class C { - static y = (x.push("a"), "old_value"); - static ["y"] = (x.push("b"), "another_value"); - static "y" = (x.push("c"), "same_value"); - static y = (x.push("d"), "same_value"); -} - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); - -verifyProperty(C, "y", { - value: "same_value", - enumerable: true, - writable: true, - configurable: true -}); - -assert(compareArray(x, ["a", "b", "c", "d"])); - -var c = new C(); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); - -assert(compareArray(x, ["a", "b", "c", "d"]), "static fields are not redefined on class instatiation"); diff --git a/test/language/statements/class/fields-static-string-literal-name-init-err-contains-arguments.js b/test/language/statements/class/fields-static-string-literal-name-init-err-contains-arguments.js deleted file mode 100644 index 2c3608db163f3255bd42d1350d30f2ab7d718750..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-static-string-literal-name-init-err-contains-arguments.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-arguments.case -// - src/class-fields/initializer-error/cls-decl-fields-static-string-literal-name.template -/*--- -description: Syntax error if `arguments` used in class field (static string literal ClassElementName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if ContainsArguments of Initializer is true. - - Static Semantics: ContainsArguments - IdentifierReference : Identifier - - 1. If the StringValue of Identifier is "arguments", return true. - ... - For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - static 'x' = arguments; -} diff --git a/test/language/statements/class/fields-static-string-literal-name-init-err-contains-super.js b/test/language/statements/class/fields-static-string-literal-name-init-err-contains-super.js deleted file mode 100644 index 66b7e57e2ca8a2a7152ce9b0eb7e53f7f2ce126b..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-static-string-literal-name-init-err-contains-super.js +++ /dev/null @@ -1,27 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/init-err-contains-super.case -// - src/class-fields/initializer-error/cls-decl-fields-static-string-literal-name.template -/*--- -description: Syntax error if `super()` used in class field (static string literal ClassElementName) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: Early Errors - - FieldDefinition: - PropertyNameInitializeropt - - - It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true. - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - static 'x' = super(); -} diff --git a/test/language/statements/class/fields-string-name-static-propname-constructor.js b/test/language/statements/class/fields-string-name-static-propname-constructor.js deleted file mode 100644 index 3ce29b208793727050c5f8d2cc8b2bd1190995fc..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-string-name-static-propname-constructor.js +++ /dev/null @@ -1,32 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-propname-constructor.case -// - src/class-fields/propname-error-static/cls-decl-static-string-name.template -/*--- -description: static class field forbid PropName 'constructor' (early error -- PropName of StringLiteral is forbidden value) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: PropName - ... - LiteralPropertyName : StringLiteral - Return the String value whose code units are the SV of the StringLiteral. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : staticFieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - static 'constructor'; -} diff --git a/test/language/statements/class/fields-string-name-static-propname-prototype.js b/test/language/statements/class/fields-string-name-static-propname-prototype.js deleted file mode 100644 index 69ea7375e302692cb753de241ccc7886e5220f6a..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-string-name-static-propname-prototype.js +++ /dev/null @@ -1,32 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-propname-prototype.case -// - src/class-fields/propname-error-static/cls-decl-static-string-name.template -/*--- -description: static class fields forbid PropName 'prototype' (early error -- PropName of StringLiteral is forbidden value) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -flags: [generated] -negative: - phase: early - type: SyntaxError -info: | - Static Semantics: PropName - ... - LiteralPropertyName : StringLiteral - Return the String value whose code units are the SV of the StringLiteral. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : staticFieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - static 'prototype'; -} diff --git a/test/language/statements/class/fields-wrapped-in-sc-computed-names.js b/test/language/statements/class/fields-wrapped-in-sc-computed-names.js index 5569e5e4fb6593a802a1693701658eaea4f4d95e..69b5bce83346bc8a52cdb31adf23c5fb6fe7852b 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-computed-names.js +++ b/test/language/statements/class/fields-wrapped-in-sc-computed-names.js @@ -25,23 +25,13 @@ var x = "b"; class C { ;;;; - ;;;;;;static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];;;;;;; + ;;;;;;[x] = 42; [10] = "meep"; ["not initialized"];;;;;;; ;;;; } var c = new C(); -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); - assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); diff --git a/test/language/statements/class/fields-wrapped-in-sc-static-computed-names.js b/test/language/statements/class/fields-wrapped-in-sc-static-computed-names.js deleted file mode 100644 index e0b48ea721de120a296a32695b027f16de5d8d01..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-wrapped-in-sc-static-computed-names.js +++ /dev/null @@ -1,48 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-names.case -// - src/class-fields/productions/cls-decl-wrapped-in-sc.template -/*--- -description: Static Computed property names (fields definition wrapped in semicolons) -esid: prod-FieldDefinition -features: [computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ - - -class C { - ;;;; - ;;;;;;static ["a"] = 42; ["a"] = 39;;;;;;; - ;;;; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); - -verifyProperty(C, "a", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -verifyProperty(c, "a", { - value: 39, - enumerable: true, - writable: true, - configurable: true -}); diff --git a/test/language/statements/class/fields-wrapped-in-sc-static-computed-symbol-names.js b/test/language/statements/class/fields-wrapped-in-sc-static-computed-symbol-names.js deleted file mode 100644 index 6ad4e2161945bf8dd08e896d4d66bd7881aa8d81..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-wrapped-in-sc-static-computed-symbol-names.js +++ /dev/null @@ -1,62 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-computed-symbol-names.case -// - src/class-fields/productions/cls-decl-wrapped-in-sc.template -/*--- -description: Static computed property symbol names (fields definition wrapped in semicolons) -esid: prod-FieldDefinition -features: [Symbol, computed-property-names, class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -var x = Symbol(); -var y = Symbol(); - - - -class C { - ;;;; - ;;;;;;static [x]; static [y] = 42;;;;;;; - ;;;; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false); -assert.sameValue(Object.hasOwnProperty.call(c, x), false); - -verifyProperty(C, x, { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false); -assert.sameValue(Object.hasOwnProperty.call(c, y), false); - -verifyProperty(C, y, { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "x"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "x"), false); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "y"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "y"), false); diff --git a/test/language/statements/class/fields-wrapped-in-sc-static-literal-names.js b/test/language/statements/class/fields-wrapped-in-sc-static-literal-names.js deleted file mode 100644 index 4ceef4485c3209938b34c8580a546853ef977d7e..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-wrapped-in-sc-static-literal-names.js +++ /dev/null @@ -1,65 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-literal-names.case -// - src/class-fields/productions/cls-decl-wrapped-in-sc.template -/*--- -description: Static literal property names (fields definition wrapped in semicolons) -esid: prod-FieldDefinition -features: [class, class-fields-public] -flags: [generated] -includes: [propertyHelper.js] -info: | - ClassElement: - ... - FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PropertyName - ----*/ -const fn = function() {} - - - -class C { - ;;;; - ;;;;;;static a; b = 42; - static c = fn;;;;;;; - ;;;; - -} - -var c = new C(); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "a"), false); - -verifyProperty(C, "a", { - value: undefined, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); -assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); - -verifyProperty(c, "b", { - value: 42, - enumerable: true, - writable: true, - configurable: true -}); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false); -assert.sameValue(Object.hasOwnProperty.call(c, "c"), false); - -verifyProperty(C, "c", { - value: fn, - enumerable: true, - writable: true, - configurable: true -}); - diff --git a/test/language/statements/class/fields-wrapped-in-sc-static-private-names.js b/test/language/statements/class/fields-wrapped-in-sc-static-private-names.js deleted file mode 100644 index 2238a0c10c139d83b064dd8296d85e1ca329cdb1..0000000000000000000000000000000000000000 --- a/test/language/statements/class/fields-wrapped-in-sc-static-private-names.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/static-private-names.case -// - src/class-fields/productions/cls-decl-wrapped-in-sc.template -/*--- -description: literal private names (fields definition wrapped in semicolons) -esid: prod-FieldDefinition -features: [class-fields-private, class, class-fields-public] -flags: [generated] -info: | - ClassElement: - ... - static FieldDefinition ; - - FieldDefinition: - ClassElementName Initializer_opt - - ClassElementName: - PrivateName - - PrivateName: - #IdentifierName - ----*/ - - -class C { - ;;;; - ;;;;;;static #x; static #y;;;;;;; - ;;;; -static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } -} - -var c = new C(); - -// Test the private fields do not appear as properties before set to value -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1"); -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2"); -assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3"); - -assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5"); -assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6"); - -// Test if private fields can be sucessfully accessed and set to value -assert.sameValue(C.x(), 42, "test 7"); -assert.sameValue(C.y(), 43, "test 8"); - -// Test the private fields do not appear as properties before after set to value -assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9"); -assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10");