Skip to content
Snippets Groups Projects
Unverified Commit a7ccd304 authored by Leo Balter's avatar Leo Balter
Browse files

Generate tests

parent f3f3b473
No related branches found
No related tags found
No related merge requests found
Showing
with 1359 additions and 0 deletions
// 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
});
// 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);
// 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
});
// 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
});
// 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);
// 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
});
// 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
});
// 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
});
// 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);
// 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
});
// 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
});
// 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);
// 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
});
// 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
});
// 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);
// 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);
// 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);
// 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);
// 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);
// 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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment