regenerate files

This commit is contained in:
Valerie R Young 2017-10-30 00:39:14 -04:00 committed by Leo Balter
parent dd371194fe
commit 1bbedf4b02
No known key found for this signature in database
GPG Key ID: 2C75F319D398E36B
306 changed files with 4854 additions and 0 deletions

View File

@ -25,6 +25,7 @@ var x = "b";
var C = class {
*m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
}
var c = new C();

View File

@ -26,6 +26,7 @@ var y = Symbol();
var C = class {
*m() { return 42; } [x]; [y] = 42;
}
var c = new C();

View File

@ -26,6 +26,7 @@ const fn = function() {}
var C = class {
*m() { return 42; } a; b = 42;
c = fn;
}
var c = new C();

View File

@ -0,0 +1,65 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/private-names.case
// - src/class-fields/default/cls-expr-after-same-line-gen.template
/*---
description: static literal private names (field definitions after a generator in the same line)
esid: prod-FieldDefinition
features: [generators, class-fields]
flags: [generated]
info: |
ClassElement:
...
FieldDefinition ;
FieldDefinition:
ClassElementName Initializer_opt
ClassElementName:
PrivateName
PrivateName:
#IdentifierName
---*/
var C = class {
*m() { return 42; } #x; #y;
x() {
this.#x = 42;
return this.#x;
}
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");

View File

@ -24,6 +24,7 @@ info: |
var C = class {
*m() { return 42; } static ["a"] = 42; ["a"] = 39;
}
var c = new C();

View File

@ -26,6 +26,7 @@ var y = Symbol();
var C = class {
*m() { return 42; } [x]; [y] = 42;
}
var c = new C();

View File

@ -26,6 +26,7 @@ const fn = function() {}
var C = class {
*m() { return 42; } static a; b = 42;
static c = fn;
}
var c = new C();

View File

@ -0,0 +1,65 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/static-private-names.case
// - src/class-fields/default/cls-expr-after-same-line-gen.template
/*---
description: literal private names (field definitions after a generator in the same line)
esid: prod-FieldDefinition
features: [generators, class-fields]
flags: [generated]
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");

View File

@ -24,6 +24,7 @@ info: |
var C = class {
*m() { return 42; } 'a'; "b"; 'c' = 39;
"d" = 42;
}
var c = new C();

View File

@ -25,6 +25,7 @@ var x = "b";
var C = class {
m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
}
var c = new C();

View File

@ -26,6 +26,7 @@ var y = Symbol();
var C = class {
m() { return 42; } [x]; [y] = 42;
}
var c = new C();

View File

@ -26,6 +26,7 @@ const fn = function() {}
var C = class {
m() { return 42; } a; b = 42;
c = fn;
}
var c = new C();

View File

@ -0,0 +1,65 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/private-names.case
// - src/class-fields/default/cls-expr-after-same-line-method.template
/*---
description: static literal private names (field definitions after a method in the same line)
esid: prod-FieldDefinition
features: [class-fields]
flags: [generated]
info: |
ClassElement:
...
FieldDefinition ;
FieldDefinition:
ClassElementName Initializer_opt
ClassElementName:
PrivateName
PrivateName:
#IdentifierName
---*/
var C = class {
m() { return 42; } #x; #y;
x() {
this.#x = 42;
return this.#x;
}
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");

View File

@ -24,6 +24,7 @@ info: |
var C = class {
m() { return 42; } static ["a"] = 42; ["a"] = 39;
}
var c = new C();

View File

@ -26,6 +26,7 @@ var y = Symbol();
var C = class {
m() { return 42; } [x]; [y] = 42;
}
var c = new C();

View File

@ -26,6 +26,7 @@ const fn = function() {}
var C = class {
m() { return 42; } static a; b = 42;
static c = fn;
}
var c = new C();

View File

@ -0,0 +1,65 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/static-private-names.case
// - src/class-fields/default/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]
flags: [generated]
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");

View File

@ -24,6 +24,7 @@ info: |
var C = class {
m() { return 42; } 'a'; "b"; 'c' = 39;
"d" = 42;
}
var c = new C();

View File

@ -25,6 +25,7 @@ var x = "b";
var C = class {
static async *m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
}
var c = new C();

View File

@ -26,6 +26,7 @@ var y = Symbol();
var C = class {
static async *m() { return 42; } [x]; [y] = 42;
}
var c = new C();

View File

@ -26,6 +26,7 @@ const fn = function() {}
var C = class {
static async *m() { return 42; } a; b = 42;
c = fn;
}
var c = new C();

View File

@ -0,0 +1,69 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/private-names.case
// - src/class-fields/default/cls-expr-after-same-line-static-async-gen.template
/*---
description: static literal private names (field definitions after a static async generator in the same line)
esid: prod-FieldDefinition
features: [class-fields, async-iteration]
flags: [generated, async]
info: |
ClassElement:
...
FieldDefinition ;
FieldDefinition:
ClassElementName Initializer_opt
ClassElementName:
PrivateName
PrivateName:
#IdentifierName
---*/
var C = class {
static async *m() { return 42; } #x; #y;
x() {
this.#x = 42;
return this.#x;
}
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);

View File

@ -24,6 +24,7 @@ info: |
var C = class {
static async *m() { return 42; } static ["a"] = 42; ["a"] = 39;
}
var c = new C();

View File

@ -26,6 +26,7 @@ var y = Symbol();
var C = class {
static async *m() { return 42; } [x]; [y] = 42;
}
var c = new C();

View File

@ -26,6 +26,7 @@ const fn = function() {}
var C = class {
static async *m() { return 42; } static a; b = 42;
static c = fn;
}
var c = new C();

View File

@ -0,0 +1,69 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/static-private-names.case
// - src/class-fields/default/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, async-iteration]
flags: [generated, async]
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);

View File

@ -24,6 +24,7 @@ info: |
var C = class {
static async *m() { return 42; } 'a'; "b"; 'c' = 39;
"d" = 42;
}
var c = new C();

View File

@ -25,6 +25,7 @@ var x = "b";
var C = class {
static async m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
}
var c = new C();

View File

@ -26,6 +26,7 @@ var y = Symbol();
var C = class {
static async m() { return 42; } [x]; [y] = 42;
}
var c = new C();

View File

@ -26,6 +26,7 @@ const fn = function() {}
var C = class {
static async m() { return 42; } a; b = 42;
c = fn;
}
var c = new C();

View File

@ -0,0 +1,68 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/private-names.case
// - src/class-fields/default/cls-expr-after-same-line-static-async-method.template
/*---
description: static literal private names (field definitions after a static async method in the same line)
esid: prod-FieldDefinition
features: [class-fields, async-functions]
flags: [generated, async]
info: |
ClassElement:
...
FieldDefinition ;
FieldDefinition:
ClassElementName Initializer_opt
ClassElementName:
PrivateName
PrivateName:
#IdentifierName
---*/
var C = class {
static async m() { return 42; } #x; #y;
x() {
this.#x = 42;
return this.#x;
}
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);

View File

@ -24,6 +24,7 @@ info: |
var C = class {
static async m() { return 42; } static ["a"] = 42; ["a"] = 39;
}
var c = new C();

View File

@ -26,6 +26,7 @@ var y = Symbol();
var C = class {
static async m() { return 42; } [x]; [y] = 42;
}
var c = new C();

View File

@ -26,6 +26,7 @@ const fn = function() {}
var C = class {
static async m() { return 42; } static a; b = 42;
static c = fn;
}
var c = new C();

View File

@ -0,0 +1,68 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/static-private-names.case
// - src/class-fields/default/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, async-functions]
flags: [generated, async]
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);

View File

@ -24,6 +24,7 @@ info: |
var C = class {
static async m() { return 42; } 'a'; "b"; 'c' = 39;
"d" = 42;
}
var c = new C();

View File

@ -25,6 +25,7 @@ var x = "b";
var C = class {
static *m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
}
var c = new C();

View File

@ -26,6 +26,7 @@ var y = Symbol();
var C = class {
static *m() { return 42; } [x]; [y] = 42;
}
var c = new C();

View File

@ -26,6 +26,7 @@ const fn = function() {}
var C = class {
static *m() { return 42; } a; b = 42;
c = fn;
}
var c = new C();

View File

@ -0,0 +1,65 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/private-names.case
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
/*---
description: static literal private names (field definitions after a static generator in the same line)
esid: prod-FieldDefinition
features: [generators, class-fields]
flags: [generated]
info: |
ClassElement:
...
FieldDefinition ;
FieldDefinition:
ClassElementName Initializer_opt
ClassElementName:
PrivateName
PrivateName:
#IdentifierName
---*/
var C = class {
static *m() { return 42; } #x; #y;
x() {
this.#x = 42;
return this.#x;
}
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");

View File

@ -24,6 +24,7 @@ info: |
var C = class {
static *m() { return 42; } static ["a"] = 42; ["a"] = 39;
}
var c = new C();

View File

@ -26,6 +26,7 @@ var y = Symbol();
var C = class {
static *m() { return 42; } [x]; [y] = 42;
}
var c = new C();

View File

@ -26,6 +26,7 @@ const fn = function() {}
var C = class {
static *m() { return 42; } static a; b = 42;
static c = fn;
}
var c = new C();

View File

@ -0,0 +1,65 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/static-private-names.case
// - src/class-fields/default/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: [generators, class-fields]
flags: [generated]
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");

View File

@ -24,6 +24,7 @@ info: |
var C = class {
static *m() { return 42; } 'a'; "b"; 'c' = 39;
"d" = 42;
}
var c = new C();

View File

@ -25,6 +25,7 @@ var x = "b";
var C = class {
static m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
}
var c = new C();

View File

@ -26,6 +26,7 @@ var y = Symbol();
var C = class {
static m() { return 42; } [x]; [y] = 42;
}
var c = new C();

View File

@ -26,6 +26,7 @@ const fn = function() {}
var C = class {
static m() { return 42; } a; b = 42;
c = fn;
}
var c = new C();

View File

@ -0,0 +1,65 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/private-names.case
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
/*---
description: static literal private names (field definitions after a static method in the same line)
esid: prod-FieldDefinition
features: [class-fields]
flags: [generated]
info: |
ClassElement:
...
FieldDefinition ;
FieldDefinition:
ClassElementName Initializer_opt
ClassElementName:
PrivateName
PrivateName:
#IdentifierName
---*/
var C = class {
static m() { return 42; } #x; #y;
x() {
this.#x = 42;
return this.#x;
}
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");

View File

@ -24,6 +24,7 @@ info: |
var C = class {
static m() { return 42; } static ["a"] = 42; ["a"] = 39;
}
var c = new C();

View File

@ -26,6 +26,7 @@ var y = Symbol();
var C = class {
static m() { return 42; } [x]; [y] = 42;
}
var c = new C();

View File

@ -26,6 +26,7 @@ const fn = function() {}
var C = class {
static m() { return 42; } static a; b = 42;
static c = fn;
}
var c = new C();

View File

@ -0,0 +1,65 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/static-private-names.case
// - src/class-fields/default/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]
flags: [generated]
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");

View File

@ -24,6 +24,7 @@ info: |
var C = class {
static m() { return 42; } 'a'; "b"; 'c' = 39;
"d" = 42;
}
var c = new C();

View File

@ -29,6 +29,7 @@ var C = class {
static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]
m2() { return 39 }
bar = "barbaz";
}
var c = new C();

View File

@ -30,6 +30,7 @@ var C = class {
[x]; [y] = 42
m2() { return 39 }
bar = "barbaz";
}
var c = new C();

View File

@ -30,6 +30,7 @@ var C = class {
c = fn
m2() { return 39 }
bar = "barbaz";
}
var c = new C();

View File

@ -0,0 +1,101 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/private-names.case
// - src/class-fields/default/cls-expr-multiple-definitions.template
/*---
description: static literal private names (multiple fields definitions)
esid: prod-FieldDefinition
features: [class-fields]
flags: [generated]
info: |
ClassElement:
...
FieldDefinition ;
FieldDefinition:
ClassElementName Initializer_opt
ClassElementName:
PrivateName
PrivateName:
#IdentifierName
---*/
var C = class {
foo = "foobar";
m() { return 42 }
#x; #y
m2() { return 39 }
bar = "barbaz";
x() {
this.#x = 42;
return this.#x;
}
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");

View File

@ -28,6 +28,7 @@ var C = class {
static ["a"] = 42; ["a"] = 39
m2() { return 39 }
bar = "barbaz";
}
var c = new C();

View File

@ -30,6 +30,7 @@ var C = class {
[x]; [y] = 42
m2() { return 39 }
bar = "barbaz";
}
var c = new C();

View File

@ -30,6 +30,7 @@ var C = class {
static c = fn
m2() { return 39 }
bar = "barbaz";
}
var c = new C();

View File

@ -0,0 +1,101 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/static-private-names.case
// - src/class-fields/default/cls-expr-multiple-definitions.template
/*---
description: literal private names (multiple fields definitions)
esid: prod-FieldDefinition
features: [class-fields]
flags: [generated]
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");

View File

@ -28,6 +28,7 @@ var C = class {
"d" = 42
m2() { return 39 }
bar = "barbaz";
}
var c = new C();

View File

@ -27,6 +27,7 @@ var C = class {
static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]
foo = "foobar"
bar = "barbaz";
}
var c = new C();

View File

@ -28,6 +28,7 @@ var C = class {
[x]; [y] = 42
foo = "foobar"
bar = "barbaz";
}
var c = new C();

View File

@ -28,6 +28,7 @@ var C = class {
c = fn
foo = "foobar"
bar = "barbaz";
}
var c = new C();

View File

@ -0,0 +1,79 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/private-names.case
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
/*---
description: static literal private names (multiple stacked fields definitions through ASI)
esid: prod-FieldDefinition
features: [class-fields]
flags: [generated]
info: |
ClassElement:
...
FieldDefinition ;
FieldDefinition:
ClassElementName Initializer_opt
ClassElementName:
PrivateName
PrivateName:
#IdentifierName
---*/
var C = class {
#x; #y
foo = "foobar"
bar = "barbaz";
x() {
this.#x = 42;
return this.#x;
}
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");

View File

@ -26,6 +26,7 @@ var C = class {
static ["a"] = 42; ["a"] = 39
foo = "foobar"
bar = "barbaz";
}
var c = new C();

View File

@ -28,6 +28,7 @@ var C = class {
[x]; [y] = 42
foo = "foobar"
bar = "barbaz";
}
var c = new C();

View File

@ -28,6 +28,7 @@ var C = class {
static c = fn
foo = "foobar"
bar = "barbaz";
}
var c = new C();

View File

@ -0,0 +1,79 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/static-private-names.case
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
/*---
description: literal private names (multiple stacked fields definitions through ASI)
esid: prod-FieldDefinition
features: [class-fields]
flags: [generated]
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");

View File

@ -26,6 +26,7 @@ var C = class {
"d" = 42
foo = "foobar"
bar = "barbaz";
}
var c = new C();

View File

@ -26,6 +26,7 @@ var x = "b";
var C = class {
static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]
m() { return 42; }
}
var c = new C();

View File

@ -27,6 +27,7 @@ var y = Symbol();
var C = class {
[x]; [y] = 42
m() { return 42; }
}
var c = new C();

View File

@ -27,6 +27,7 @@ var C = class {
a; b = 42;
c = fn
m() { return 42; }
}
var c = new C();

View File

@ -0,0 +1,66 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/private-names.case
// - src/class-fields/default/cls-expr-new-no-sc-line-method.template
/*---
description: static literal private names (field definitions followed by a method in a new line without a semicolon)
esid: prod-FieldDefinition
features: [class-fields]
flags: [generated]
info: |
ClassElement:
...
FieldDefinition ;
FieldDefinition:
ClassElementName Initializer_opt
ClassElementName:
PrivateName
PrivateName:
#IdentifierName
---*/
var C = class {
#x; #y
m() { return 42; }
x() {
this.#x = 42;
return this.#x;
}
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");

View File

@ -25,6 +25,7 @@ info: |
var C = class {
static ["a"] = 42; ["a"] = 39
m() { return 42; }
}
var c = new C();

View File

@ -27,6 +27,7 @@ var y = Symbol();
var C = class {
[x]; [y] = 42
m() { return 42; }
}
var c = new C();

View File

@ -27,6 +27,7 @@ var C = class {
static a; b = 42;
static c = fn
m() { return 42; }
}
var c = new C();

View File

@ -0,0 +1,66 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/static-private-names.case
// - src/class-fields/default/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]
flags: [generated]
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");

View File

@ -25,6 +25,7 @@ var C = class {
'a'; "b"; 'c' = 39;
"d" = 42
m() { return 42; }
}
var c = new C();

View File

@ -26,6 +26,7 @@ var x = "b";
var C = class {
static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
*m() { return 42; }
}
var c = new C();

View File

@ -27,6 +27,7 @@ var y = Symbol();
var C = class {
[x]; [y] = 42;
*m() { return 42; }
}
var c = new C();

View File

@ -27,6 +27,7 @@ var C = class {
a; b = 42;
c = fn;
*m() { return 42; }
}
var c = new C();

View File

@ -0,0 +1,66 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/private-names.case
// - src/class-fields/default/cls-expr-new-sc-line-generator.template
/*---
description: static literal private names (field definitions followed by a method in a new line with a semicolon)
esid: prod-FieldDefinition
features: [class-fields, generators]
flags: [generated]
info: |
ClassElement:
...
FieldDefinition ;
FieldDefinition:
ClassElementName Initializer_opt
ClassElementName:
PrivateName
PrivateName:
#IdentifierName
---*/
var C = class {
#x; #y;
*m() { return 42; }
x() {
this.#x = 42;
return this.#x;
}
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");

View File

@ -25,6 +25,7 @@ info: |
var C = class {
static ["a"] = 42; ["a"] = 39;
*m() { return 42; }
}
var c = new C();

View File

@ -27,6 +27,7 @@ var y = Symbol();
var C = class {
[x]; [y] = 42;
*m() { return 42; }
}
var c = new C();

View File

@ -27,6 +27,7 @@ var C = class {
static a; b = 42;
static c = fn;
*m() { return 42; }
}
var c = new C();

View File

@ -0,0 +1,66 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/static-private-names.case
// - src/class-fields/default/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, generators]
flags: [generated]
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");

View File

@ -25,6 +25,7 @@ var C = class {
'a'; "b"; 'c' = 39;
"d" = 42;
*m() { return 42; }
}
var c = new C();

View File

@ -26,6 +26,7 @@ var x = "b";
var C = class {
static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
m() { return 42; }
}
var c = new C();

View File

@ -27,6 +27,7 @@ var y = Symbol();
var C = class {
[x]; [y] = 42;
m() { return 42; }
}
var c = new C();

View File

@ -27,6 +27,7 @@ var C = class {
a; b = 42;
c = fn;
m() { return 42; }
}
var c = new C();

View File

@ -0,0 +1,66 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/private-names.case
// - src/class-fields/default/cls-expr-new-sc-line-method.template
/*---
description: static literal private names (field definitions followed by a method in a new line with a semicolon)
esid: prod-FieldDefinition
features: [class-fields]
flags: [generated]
info: |
ClassElement:
...
FieldDefinition ;
FieldDefinition:
ClassElementName Initializer_opt
ClassElementName:
PrivateName
PrivateName:
#IdentifierName
---*/
var C = class {
#x; #y;
m() { return 42; }
x() {
this.#x = 42;
return this.#x;
}
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");

View File

@ -25,6 +25,7 @@ info: |
var C = class {
static ["a"] = 42; ["a"] = 39;
m() { return 42; }
}
var c = new C();

View File

@ -27,6 +27,7 @@ var y = Symbol();
var C = class {
[x]; [y] = 42;
m() { return 42; }
}
var c = new C();

View File

@ -27,6 +27,7 @@ var C = class {
static a; b = 42;
static c = fn;
m() { return 42; }
}
var c = new C();

View File

@ -0,0 +1,66 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/static-private-names.case
// - src/class-fields/default/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]
flags: [generated]
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");

View File

@ -25,6 +25,7 @@ var C = class {
'a'; "b"; 'c' = 39;
"d" = 42;
m() { return 42; }
}
var c = new C();

View File

@ -25,6 +25,7 @@ var x = "b";
var C = class {
static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]
}
var c = new C();

Some files were not shown because too many files have changed in this diff Show More