mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 08:24:23 +02:00
Generate tests
This commit is contained in:
parent
f3f3b47306
commit
a7ccd3042b
@ -0,0 +1,83 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: Computed property names (field definitions after a generator in the same line)
|
||||
features: [computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = "b";
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
*m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
|
||||
}
|
||||
|
||||
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: 39,
|
||||
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, "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, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,68 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions after a generator in the same line)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
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; } [x]; [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);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: Literal property names (field definitions after a generator in the same line)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
const fn = function() {}
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
*m() { return 42; } a; b = 42;
|
||||
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
|
||||
});
|
||||
|
@ -0,0 +1,54 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: Static Computed property names (field definitions after a generator in the same line)
|
||||
features: [computed-property-names, class-fields]
|
||||
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
|
||||
});
|
@ -0,0 +1,68 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: Static computed property symbol names (field definitions after a generator in the same line)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
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; } [x]; [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);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: Static literal property names (field definitions after a generator in the same line)
|
||||
features: [class-fields]
|
||||
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
|
||||
});
|
||||
|
@ -0,0 +1,48 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: String literal names (field definitions after a generator in the same line)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
*m() { return 42; } 'a'; "b"; 'c' = 39;
|
||||
"d" = 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, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,83 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: Computed property names (field definitions after a method in the same line)
|
||||
features: [computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = "b";
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
|
||||
}
|
||||
|
||||
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: 39,
|
||||
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, "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, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,68 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions after a method in the same line)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
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; } [x]; [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);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: Literal property names (field definitions after a method in the same line)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
const fn = function() {}
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
m() { return 42; } a; b = 42;
|
||||
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
|
||||
});
|
||||
|
@ -0,0 +1,54 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: Static Computed property names (field definitions after a method in the same line)
|
||||
features: [computed-property-names, class-fields]
|
||||
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
|
||||
});
|
@ -0,0 +1,68 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: Static computed property symbol names (field definitions after a method in the same line)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
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; } [x]; [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);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: Static literal property names (field definitions after a method in the same line)
|
||||
features: [class-fields]
|
||||
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
|
||||
});
|
||||
|
@ -0,0 +1,48 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: String literal names (field definitions after a method in the same line)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
m() { return 42; } 'a'; "b"; 'c' = 39;
|
||||
"d" = 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, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,86 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-gen.template
|
||||
/*---
|
||||
description: Computed property names (field definitions after a static async generator in the same line)
|
||||
features: [computed-property-names, class-fields, async-iteration]
|
||||
flags: [generated, async]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = "b";
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
static async *m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
|
||||
}
|
||||
|
||||
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,
|
||||
});
|
||||
|
||||
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);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
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, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-gen.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions after a static async generator in the same line)
|
||||
features: [Symbol, computed-property-names, class-fields, 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; } [x]; [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,
|
||||
});
|
||||
|
||||
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, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-gen.template
|
||||
/*---
|
||||
description: Literal property names (field definitions after a static async generator in the same line)
|
||||
features: [class-fields, 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; } a; b = 42;
|
||||
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,
|
||||
});
|
||||
|
||||
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, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/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)
|
||||
features: [computed-property-names, class-fields, 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,
|
||||
});
|
||||
|
||||
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, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/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)
|
||||
features: [Symbol, computed-property-names, class-fields, 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; } [x]; [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,
|
||||
});
|
||||
|
||||
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, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/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)
|
||||
features: [class-fields, 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,
|
||||
});
|
||||
|
||||
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, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,51 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-gen.template
|
||||
/*---
|
||||
description: String literal names (field definitions after a static async generator in the same line)
|
||||
features: [class-fields, async-iteration]
|
||||
flags: [generated, async]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
static async *m() { return 42; } 'a'; "b"; 'c' = 39;
|
||||
"d" = 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,
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,86 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-method.template
|
||||
/*---
|
||||
description: Computed property names (field definitions after a static async method in the same line)
|
||||
features: [computed-property-names, class-fields, async-functions]
|
||||
flags: [generated, async]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = "b";
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
static async m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
|
||||
}
|
||||
|
||||
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,
|
||||
});
|
||||
|
||||
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);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
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, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-method.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions after a static async method in the same line)
|
||||
features: [Symbol, computed-property-names, class-fields, 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; } [x]; [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,
|
||||
});
|
||||
|
||||
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);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-method.template
|
||||
/*---
|
||||
description: Literal property names (field definitions after a static async method in the same line)
|
||||
features: [class-fields, 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; } a; b = 42;
|
||||
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,
|
||||
});
|
||||
|
||||
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);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/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)
|
||||
features: [computed-property-names, class-fields, 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,
|
||||
});
|
||||
|
||||
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);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/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)
|
||||
features: [Symbol, computed-property-names, class-fields, 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; } [x]; [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,
|
||||
});
|
||||
|
||||
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);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/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)
|
||||
features: [class-fields, 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,
|
||||
});
|
||||
|
||||
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);
|
@ -0,0 +1,51 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-method.template
|
||||
/*---
|
||||
description: String literal names (field definitions after a static async method in the same line)
|
||||
features: [class-fields, async-functions]
|
||||
flags: [generated, async]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
static async m() { return 42; } 'a'; "b"; 'c' = 39;
|
||||
"d" = 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,
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,83 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: Computed property names (field definitions after a static generator in the same line)
|
||||
features: [computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = "b";
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
static *m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
|
||||
}
|
||||
|
||||
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: 39,
|
||||
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, "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, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,68 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions after a static generator in the same line)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
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; } [x]; [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);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: Literal property names (field definitions after a static generator in the same line)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
const fn = function() {}
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
static *m() { return 42; } a; b = 42;
|
||||
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
|
||||
});
|
||||
|
@ -0,0 +1,54 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: Static Computed property names (field definitions after a static generator in the same line)
|
||||
features: [computed-property-names, class-fields]
|
||||
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
|
||||
});
|
@ -0,0 +1,68 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: Static computed property symbol names (field definitions after a static generator in the same line)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
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; } [x]; [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);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: Static literal property names (field definitions after a static generator in the same line)
|
||||
features: [class-fields]
|
||||
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
|
||||
});
|
||||
|
@ -0,0 +1,48 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: String literal names (field definitions after a static generator in the same line)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
static *m() { return 42; } 'a'; "b"; 'c' = 39;
|
||||
"d" = 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, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,83 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: Computed property names (field definitions after a static method in the same line)
|
||||
features: [computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = "b";
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
static m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
|
||||
}
|
||||
|
||||
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: 39,
|
||||
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, "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, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,68 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions after a static method in the same line)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
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; } [x]; [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);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: Literal property names (field definitions after a static method in the same line)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
const fn = function() {}
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
static m() { return 42; } a; b = 42;
|
||||
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
|
||||
});
|
||||
|
@ -0,0 +1,54 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: Static Computed property names (field definitions after a static method in the same line)
|
||||
features: [computed-property-names, class-fields]
|
||||
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
|
||||
});
|
@ -0,0 +1,68 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: Static computed property symbol names (field definitions after a static method in the same line)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
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; } [x]; [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);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: Static literal property names (field definitions after a static method in the same line)
|
||||
features: [class-fields]
|
||||
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
|
||||
});
|
||||
|
@ -0,0 +1,48 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: String literal names (field definitions after a static method in the same line)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
static m() { return 42; } 'a'; "b"; 'c' = 39;
|
||||
"d" = 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, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,119 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: Computed property names (multiple fields definitions)
|
||||
features: [computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = "b";
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
foo = "foobar";
|
||||
m() { return 42 }
|
||||
static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]
|
||||
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: false,
|
||||
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: 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: 39,
|
||||
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, "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, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,104 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: Computed property symbol names (multiple fields definitions)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
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 }
|
||||
[x]; [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: false,
|
||||
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: 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);
|
@ -0,0 +1,107 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: Literal property names (multiple fields definitions)
|
||||
features: [class-fields]
|
||||
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 }
|
||||
a; b = 42;
|
||||
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: false,
|
||||
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: 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
|
||||
});
|
||||
|
@ -0,0 +1,90 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: Static Computed property names (multiple fields definitions)
|
||||
features: [computed-property-names, class-fields]
|
||||
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: false,
|
||||
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: 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
|
||||
});
|
@ -0,0 +1,104 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: Static computed property symbol names (multiple fields definitions)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
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 }
|
||||
[x]; [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: false,
|
||||
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: 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);
|
@ -0,0 +1,107 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: Static literal property names (multiple fields definitions)
|
||||
features: [class-fields]
|
||||
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: false,
|
||||
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: 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
|
||||
});
|
||||
|
@ -0,0 +1,84 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: String literal names (multiple fields definitions)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
foo = "foobar";
|
||||
m() { return 42 }
|
||||
'a'; "b"; 'c' = 39;
|
||||
"d" = 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: false,
|
||||
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: 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: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,101 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: Computed property names (multiple stacked fields definitions through ASI)
|
||||
features: [computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = "b";
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]
|
||||
foo = "foobar"
|
||||
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);
|
||||
|
||||
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: false,
|
||||
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: 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: 39,
|
||||
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, "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, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,86 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: Computed property symbol names (multiple stacked fields definitions through ASI)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = Symbol();
|
||||
var y = Symbol();
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
[x]; [y] = 42
|
||||
foo = "foobar"
|
||||
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);
|
||||
|
||||
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: false,
|
||||
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: 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);
|
@ -0,0 +1,89 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: Literal property names (multiple stacked fields definitions through ASI)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
const fn = function() {}
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
a; b = 42;
|
||||
c = fn
|
||||
foo = "foobar"
|
||||
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);
|
||||
|
||||
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: false,
|
||||
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: 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
|
||||
});
|
||||
|
@ -0,0 +1,72 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: Static Computed property names (multiple stacked fields definitions through ASI)
|
||||
features: [computed-property-names, class-fields]
|
||||
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.m(), 42);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "m"), false);
|
||||
assert.sameValue(c.m, C.prototype.m);
|
||||
|
||||
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: false,
|
||||
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: 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
|
||||
});
|
@ -0,0 +1,86 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: Static computed property symbol names (multiple stacked fields definitions through ASI)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = Symbol();
|
||||
var y = Symbol();
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
[x]; [y] = 42
|
||||
foo = "foobar"
|
||||
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);
|
||||
|
||||
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: false,
|
||||
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: 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);
|
@ -0,0 +1,89 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: Static literal property names (multiple stacked fields definitions through ASI)
|
||||
features: [class-fields]
|
||||
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.m(), 42);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "m"), false);
|
||||
assert.sameValue(c.m, C.prototype.m);
|
||||
|
||||
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: false,
|
||||
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: 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
|
||||
});
|
||||
|
@ -0,0 +1,66 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: String literal names (multiple stacked fields definitions through ASI)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
'a'; "b"; 'c' = 39;
|
||||
"d" = 42
|
||||
foo = "foobar"
|
||||
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);
|
||||
|
||||
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: false,
|
||||
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: 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: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,84 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-new-no-sc-line-method.template
|
||||
/*---
|
||||
description: Computed property names (field definitions followed by a method in a new line without a semicolon)
|
||||
features: [computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = "b";
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]
|
||||
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: 39,
|
||||
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, "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, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,69 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-new-no-sc-line-method.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions followed by a method in a new line without a semicolon)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = Symbol();
|
||||
var y = Symbol();
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
[x]; [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);
|
@ -0,0 +1,72 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-new-no-sc-line-method.template
|
||||
/*---
|
||||
description: Literal property names (field definitions followed by a method in a new line without a semicolon)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
const fn = function() {}
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
a; b = 42;
|
||||
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
|
||||
});
|
||||
|
@ -0,0 +1,55 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/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)
|
||||
features: [computed-property-names, class-fields]
|
||||
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
|
||||
});
|
@ -0,0 +1,69 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/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)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = Symbol();
|
||||
var y = Symbol();
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
[x]; [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);
|
@ -0,0 +1,72 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/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)
|
||||
features: [class-fields]
|
||||
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
|
||||
});
|
||||
|
@ -0,0 +1,49 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-new-no-sc-line-method.template
|
||||
/*---
|
||||
description: String literal names (field definitions followed by a method in a new line without a semicolon)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
'a'; "b"; 'c' = 39;
|
||||
"d" = 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, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,84 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-generator.template
|
||||
/*---
|
||||
description: Computed property names (field definitions followed by a method in a new line with a semicolon)
|
||||
features: [computed-property-names, class-fields, generators]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = "b";
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
|
||||
*m() { return 42; }
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(c.g().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: 39,
|
||||
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, "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, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,69 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-generator.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions followed by a method in a new line with a semicolon)
|
||||
features: [Symbol, computed-property-names, class-fields, generators]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = Symbol();
|
||||
var y = Symbol();
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
[x]; [y] = 42;
|
||||
*m() { return 42; }
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(c.g().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);
|
@ -0,0 +1,72 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-generator.template
|
||||
/*---
|
||||
description: Literal property names (field definitions followed by a method in a new line with a semicolon)
|
||||
features: [class-fields, generators]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
const fn = function() {}
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
a; b = 42;
|
||||
c = fn;
|
||||
*m() { return 42; }
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(c.g().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
|
||||
});
|
||||
|
@ -0,0 +1,55 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/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)
|
||||
features: [computed-property-names, class-fields, 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.g().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
|
||||
});
|
@ -0,0 +1,69 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/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)
|
||||
features: [Symbol, computed-property-names, class-fields, generators]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = Symbol();
|
||||
var y = Symbol();
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
[x]; [y] = 42;
|
||||
*m() { return 42; }
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(c.g().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);
|
@ -0,0 +1,72 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/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)
|
||||
features: [class-fields, 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.g().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
|
||||
});
|
||||
|
@ -0,0 +1,49 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-generator.template
|
||||
/*---
|
||||
description: String literal names (field definitions followed by a method in a new line with a semicolon)
|
||||
features: [class-fields, generators]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
'a'; "b"; 'c' = 39;
|
||||
"d" = 42;
|
||||
*m() { return 42; }
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(c.g().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: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,84 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-method.template
|
||||
/*---
|
||||
description: Computed property names (field definitions followed by a method in a new line with a semicolon)
|
||||
features: [computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = "b";
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
|
||||
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: 39,
|
||||
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, "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, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,69 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-method.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions followed by a method in a new line with a semicolon)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = Symbol();
|
||||
var y = Symbol();
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
[x]; [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);
|
@ -0,0 +1,72 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-method.template
|
||||
/*---
|
||||
description: Literal property names (field definitions followed by a method in a new line with a semicolon)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
const fn = function() {}
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
a; b = 42;
|
||||
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
|
||||
});
|
||||
|
@ -0,0 +1,55 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/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)
|
||||
features: [computed-property-names, class-fields]
|
||||
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
|
||||
});
|
@ -0,0 +1,69 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/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)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = Symbol();
|
||||
var y = Symbol();
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
[x]; [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);
|
@ -0,0 +1,72 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/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)
|
||||
features: [class-fields]
|
||||
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
|
||||
});
|
||||
|
@ -0,0 +1,49 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-method.template
|
||||
/*---
|
||||
description: String literal names (field definitions followed by a method in a new line with a semicolon)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
'a'; "b"; 'c' = 39;
|
||||
"d" = 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, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,73 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-regular-definitions.template
|
||||
/*---
|
||||
description: Computed property names (regular fields defintion)
|
||||
features: [computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = "b";
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
static ["a"] = 39; [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);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
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, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,58 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-regular-definitions.template
|
||||
/*---
|
||||
description: Computed property symbol names (regular fields defintion)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = Symbol();
|
||||
var y = Symbol();
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
[x]; [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);
|
@ -0,0 +1,61 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-regular-definitions.template
|
||||
/*---
|
||||
description: Literal property names (regular fields defintion)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
const fn = function() {}
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
a; b = 42;
|
||||
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
|
||||
});
|
||||
|
@ -0,0 +1,44 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-regular-definitions.template
|
||||
/*---
|
||||
description: Static Computed property names (regular fields defintion)
|
||||
features: [computed-property-names, class-fields]
|
||||
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
|
||||
});
|
@ -0,0 +1,58 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-regular-definitions.template
|
||||
/*---
|
||||
description: Static computed property symbol names (regular fields defintion)
|
||||
features: [Symbol, computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = Symbol();
|
||||
var y = Symbol();
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
[x]; [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);
|
@ -0,0 +1,61 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-regular-definitions.template
|
||||
/*---
|
||||
description: Static literal property names (regular fields defintion)
|
||||
features: [class-fields]
|
||||
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
|
||||
});
|
||||
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-regular-definitions.template
|
||||
/*---
|
||||
description: String literal names (regular fields defintion)
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
'a'; "b"; 'c' = 39;
|
||||
"d" = 42
|
||||
}
|
||||
|
||||
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: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,86 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-async-gen.template
|
||||
/*---
|
||||
description: Computed property names (field definitions after an async generator in the same line)
|
||||
features: [computed-property-names, class-fields, async-iteration]
|
||||
flags: [generated, async]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = "b";
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
async *m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
|
||||
}
|
||||
|
||||
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,
|
||||
});
|
||||
|
||||
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);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
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, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
c.m().next().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-async-gen.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions after an async generator in the same line)
|
||||
features: [Symbol, computed-property-names, class-fields, 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; } [x]; [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,
|
||||
});
|
||||
|
||||
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, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-async-gen.template
|
||||
/*---
|
||||
description: Literal property names (field definitions after an async generator in the same line)
|
||||
features: [class-fields, 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; } a; b = 42;
|
||||
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,
|
||||
});
|
||||
|
||||
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, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-async-gen.template
|
||||
/*---
|
||||
description: Static Computed property names (field definitions after an async generator in the same line)
|
||||
features: [computed-property-names, class-fields, 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,
|
||||
});
|
||||
|
||||
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, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-async-gen.template
|
||||
/*---
|
||||
description: Static computed property symbol names (field definitions after an async generator in the same line)
|
||||
features: [Symbol, computed-property-names, class-fields, 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; } [x]; [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,
|
||||
});
|
||||
|
||||
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, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-async-gen.template
|
||||
/*---
|
||||
description: Static literal property names (field definitions after an async generator in the same line)
|
||||
features: [class-fields, 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,
|
||||
});
|
||||
|
||||
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, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,51 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-async-gen.template
|
||||
/*---
|
||||
description: String literal names (field definitions after an async generator in the same line)
|
||||
features: [class-fields, async-iteration]
|
||||
flags: [generated, async]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
async *m() { return 42; } 'a'; "b"; 'c' = 39;
|
||||
"d" = 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,
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
c.m().next().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,86 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-async-method.template
|
||||
/*---
|
||||
description: Computed property names (field definitions after an async method in the same line)
|
||||
features: [computed-property-names, class-fields, async-functions]
|
||||
flags: [generated, async]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = "b";
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
async m() { return 42; } static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"];
|
||||
}
|
||||
|
||||
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,
|
||||
});
|
||||
|
||||
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);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
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, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
c.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-async-method.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions after an async method in the same line)
|
||||
features: [Symbol, computed-property-names, class-fields, 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; } [x]; [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,
|
||||
});
|
||||
|
||||
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);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-async-method.template
|
||||
/*---
|
||||
description: Literal property names (field definitions after an async method in the same line)
|
||||
features: [class-fields, 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; } a; b = 42;
|
||||
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,
|
||||
});
|
||||
|
||||
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);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-async-method.template
|
||||
/*---
|
||||
description: Static Computed property names (field definitions after an async method in the same line)
|
||||
features: [computed-property-names, class-fields, 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,
|
||||
});
|
||||
|
||||
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);
|
@ -0,0 +1,71 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-async-method.template
|
||||
/*---
|
||||
description: Static computed property symbol names (field definitions after an async method in the same line)
|
||||
features: [Symbol, computed-property-names, class-fields, 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; } [x]; [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,
|
||||
});
|
||||
|
||||
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);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-async-method.template
|
||||
/*---
|
||||
description: Static literal property names (field definitions after an async method in the same line)
|
||||
features: [class-fields, 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,
|
||||
});
|
||||
|
||||
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);
|
@ -0,0 +1,51 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-async-method.template
|
||||
/*---
|
||||
description: String literal names (field definitions after an async method in the same line)
|
||||
features: [class-fields, async-functions]
|
||||
flags: [generated, async]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
async m() { return 42; } 'a'; "b"; 'c' = 39;
|
||||
"d" = 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,
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
c.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
}, $DONE).then($DONE, $DONE);
|
@ -0,0 +1,83 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-same-line-generator.template
|
||||
/*---
|
||||
description: Computed property names (field definitions followed by a generator method in the same line)
|
||||
features: [computed-property-names, class-fields, generators]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = "b";
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"]; *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: 39,
|
||||
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, "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, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
@ -0,0 +1,68 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-same-line-generator.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions followed by a generator method in the same line)
|
||||
features: [Symbol, computed-property-names, class-fields, generators]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement:
|
||||
...
|
||||
FieldDefinition ;
|
||||
|
||||
FieldDefinition:
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName:
|
||||
PropertyName
|
||||
|
||||
---*/
|
||||
var x = Symbol();
|
||||
var y = Symbol();
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
[x]; [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);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user