mirror of https://github.com/tc39/test262.git
Adding missing cases of instance field without assignment and static field with assignment
This commit is contained in:
parent
740e157eb0
commit
6499fa6794
|
@ -0,0 +1,32 @@
|
||||||
|
// Copyright (C) 2020 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: static is a valid name of an instance field
|
||||||
|
info: |
|
||||||
|
ClassElement:
|
||||||
|
...
|
||||||
|
FieldDefinition ;
|
||||||
|
|
||||||
|
FieldDefinition:
|
||||||
|
ClassElementName Initializer_opt
|
||||||
|
|
||||||
|
ClassElementName:
|
||||||
|
PropertyName
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
features: [class-fields-public]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- elements
|
||||||
|
static = "foo";
|
||||||
|
//- assertions
|
||||||
|
let c = new C();
|
||||||
|
|
||||||
|
verifyProperty(c, "static", {
|
||||||
|
value: "foo",
|
||||||
|
enumerable: true,
|
||||||
|
writable: true,
|
||||||
|
configurable: true
|
||||||
|
});
|
||||||
|
|
|
@ -19,12 +19,12 @@ features: [class-fields-public]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//- elements
|
//- elements
|
||||||
static = "foo";
|
static;
|
||||||
//- assertions
|
//- assertions
|
||||||
let c = new C();
|
let c = new C();
|
||||||
|
|
||||||
verifyProperty(c, "static", {
|
verifyProperty(c, "static", {
|
||||||
value: "foo",
|
value: undefined,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: true,
|
writable: true,
|
||||||
configurable: true
|
configurable: true
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
// Copyright (C) 2020 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: static is a valid name of a static field
|
||||||
|
info: |
|
||||||
|
ClassElement:
|
||||||
|
...
|
||||||
|
static FieldDefinition ;
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
features: [class-static-fields-public]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- elements
|
||||||
|
static static = "test262";
|
||||||
|
//- assertions
|
||||||
|
verifyProperty(C, "static", {
|
||||||
|
value: "test262",
|
||||||
|
enumerable: true,
|
||||||
|
writable: true,
|
||||||
|
configurable: true
|
||||||
|
});
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/class-elements/static-as-valid-instance-field-assigned.case
|
||||||
|
// - src/class-elements/default/cls-expr.template
|
||||||
|
/*---
|
||||||
|
description: static is a valid name of an instance field (field definitions in a class expression)
|
||||||
|
esid: prod-FieldDefinition
|
||||||
|
features: [class-fields-public, class]
|
||||||
|
flags: [generated]
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
info: |
|
||||||
|
ClassElement:
|
||||||
|
...
|
||||||
|
FieldDefinition ;
|
||||||
|
|
||||||
|
FieldDefinition:
|
||||||
|
ClassElementName Initializer_opt
|
||||||
|
|
||||||
|
ClassElementName:
|
||||||
|
PropertyName
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static = "foo";
|
||||||
|
}
|
||||||
|
|
||||||
|
let c = new C();
|
||||||
|
|
||||||
|
verifyProperty(c, "static", {
|
||||||
|
value: "foo",
|
||||||
|
enumerable: true,
|
||||||
|
writable: true,
|
||||||
|
configurable: true
|
||||||
|
});
|
||||||
|
|
|
@ -22,13 +22,13 @@ info: |
|
||||||
|
|
||||||
|
|
||||||
var C = class {
|
var C = class {
|
||||||
static = "foo";
|
static;
|
||||||
}
|
}
|
||||||
|
|
||||||
let c = new C();
|
let c = new C();
|
||||||
|
|
||||||
verifyProperty(c, "static", {
|
verifyProperty(c, "static", {
|
||||||
value: "foo",
|
value: undefined,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: true,
|
writable: true,
|
||||||
configurable: true
|
configurable: true
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/class-elements/static-as-valid-static-field-assigned.case
|
||||||
|
// - src/class-elements/default/cls-expr.template
|
||||||
|
/*---
|
||||||
|
description: static is a valid name of a static field (field definitions in a class expression)
|
||||||
|
esid: prod-FieldDefinition
|
||||||
|
features: [class-static-fields-public, class]
|
||||||
|
flags: [generated]
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
info: |
|
||||||
|
ClassElement:
|
||||||
|
...
|
||||||
|
static FieldDefinition ;
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static static = "test262";
|
||||||
|
}
|
||||||
|
|
||||||
|
verifyProperty(C, "static", {
|
||||||
|
value: "test262",
|
||||||
|
enumerable: true,
|
||||||
|
writable: true,
|
||||||
|
configurable: true
|
||||||
|
});
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/class-elements/static-as-valid-instance-field-assigned.case
|
||||||
|
// - src/class-elements/default/cls-decl.template
|
||||||
|
/*---
|
||||||
|
description: static is a valid name of an instance field (field definitions in a class declaration)
|
||||||
|
esid: prod-FieldDefinition
|
||||||
|
features: [class-fields-public, class]
|
||||||
|
flags: [generated]
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
info: |
|
||||||
|
ClassElement:
|
||||||
|
...
|
||||||
|
FieldDefinition ;
|
||||||
|
|
||||||
|
FieldDefinition:
|
||||||
|
ClassElementName Initializer_opt
|
||||||
|
|
||||||
|
ClassElementName:
|
||||||
|
PropertyName
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static = "foo";
|
||||||
|
}
|
||||||
|
|
||||||
|
let c = new C();
|
||||||
|
|
||||||
|
verifyProperty(c, "static", {
|
||||||
|
value: "foo",
|
||||||
|
enumerable: true,
|
||||||
|
writable: true,
|
||||||
|
configurable: true
|
||||||
|
});
|
||||||
|
|
|
@ -22,13 +22,13 @@ info: |
|
||||||
|
|
||||||
|
|
||||||
class C {
|
class C {
|
||||||
static = "foo";
|
static;
|
||||||
}
|
}
|
||||||
|
|
||||||
let c = new C();
|
let c = new C();
|
||||||
|
|
||||||
verifyProperty(c, "static", {
|
verifyProperty(c, "static", {
|
||||||
value: "foo",
|
value: undefined,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
writable: true,
|
writable: true,
|
||||||
configurable: true
|
configurable: true
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/class-elements/static-as-valid-static-field-assigned.case
|
||||||
|
// - src/class-elements/default/cls-decl.template
|
||||||
|
/*---
|
||||||
|
description: static is a valid name of a static field (field definitions in a class declaration)
|
||||||
|
esid: prod-FieldDefinition
|
||||||
|
features: [class-static-fields-public, class]
|
||||||
|
flags: [generated]
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
info: |
|
||||||
|
ClassElement:
|
||||||
|
...
|
||||||
|
static FieldDefinition ;
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static static = "test262";
|
||||||
|
}
|
||||||
|
|
||||||
|
verifyProperty(C, "static", {
|
||||||
|
value: "test262",
|
||||||
|
enumerable: true,
|
||||||
|
writable: true,
|
||||||
|
configurable: true
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue