mirror of
https://github.com/tc39/test262.git
synced 2025-07-25 23:14:47 +02:00
Add initial set of class field tests (from V8's test-parsing.cc)
At this point this requires Babel for testing, but most tests in this commit won't pass until this is fixed: https://github.com/babel/babel/issues/5056
This commit is contained in:
parent
953992d235
commit
e731114cff
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Computed name var not initialized, computed name function
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a']; ['b'](){}
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
29
src/class-fields/computed-name-empty-var-empty-function.case
Normal file
29
src/class-fields/computed-name-empty-var-empty-function.case
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Computed name var not initialized, empty function
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a']; b(){}
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
30
src/class-fields/computed-name-empty-var-empty-var.case
Normal file
30
src/class-fields/computed-name-empty-var-empty-var.case
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Computed name var not initialized, var not initialized
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a']; b
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(this.b, undefined);
|
||||||
|
verifyEnumerable(this, "b");
|
||||||
|
verifyWritable(this, "b");
|
||||||
|
verifyConfigurable(this, "b");
|
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Computed name var not initialized, generator empty function
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a']; *b(){}
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
25
src/class-fields/computed-name-empty-var-new-line-asi.case
Normal file
25
src/class-fields/computed-name-empty-var-new-line-asi.case
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: computed name empty var and newline (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a']
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: computed name empty var and newline, computed name empty function (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a']
|
||||||
|
['b'](){}
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: computed name empty var and newline, empty function (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a']
|
||||||
|
b(){}
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
@ -0,0 +1,30 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: computed name empty var and newline, empty var (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a']
|
||||||
|
b
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(this.b, undefined);
|
||||||
|
verifyEnumerable(this, "b");
|
||||||
|
verifyWritable(this, "b");
|
||||||
|
verifyConfigurable(this, "b");
|
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: computed name empty var and newline, generator empty function (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a']
|
||||||
|
*b(){}
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
25
src/class-fields/computed-name-empty-var.case
Normal file
25
src/class-fields/computed-name-empty-var.case
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Computed name var not initialized
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a'];
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
@ -0,0 +1,30 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: computed name zero initialized var and newline, empty var (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a'] = 0
|
||||||
|
b
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(this.b, undefined);
|
||||||
|
verifyEnumerable(this, "b");
|
||||||
|
verifyWritable(this, "b");
|
||||||
|
verifyConfigurable(this, "b");
|
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: computed name zero initialized var and newline, empty function (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a'] = 0
|
||||||
|
b(){}
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
@ -0,0 +1,30 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: computed name zero initialized var and newline, empty var (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a'] = 0
|
||||||
|
b
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(this.b, undefined);
|
||||||
|
verifyEnumerable(this, "b");
|
||||||
|
verifyWritable(this, "b");
|
||||||
|
verifyConfigurable(this, "b");
|
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Computed name var zero initialized, computed name empty function
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a'] = 0; ['b'](){}
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Computed name var zero initialized, empty function
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a'] = 0; b(){}
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
@ -0,0 +1,30 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Computed name var zero initialized, empty var
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a'] = 0; b
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(this.b, undefined);
|
||||||
|
verifyEnumerable(this, "b");
|
||||||
|
verifyWritable(this, "b");
|
||||||
|
verifyConfigurable(this, "b");
|
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Computed name var zero initialized, generator empty function
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a'] = 0; *b(){}
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: computed name zero initialized var and newline (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a'] = 0
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
25
src/class-fields/computed-name-zero-initializer-var.case
Normal file
25
src/class-fields/computed-name-zero-initializer-var.case
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Computed name var zero initialized
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
['a'] = 0;
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
18
src/class-fields/default/cls-decl-extends.template
Normal file
18
src/class-fields/default/cls-decl-extends.template
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
path: language/expressions/class/class-field-extends-
|
||||||
|
name: class fields
|
||||||
|
---*/
|
||||||
|
|
||||||
|
class Base {}
|
||||||
|
class C extends Base {
|
||||||
|
/*{ body }*/
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
/*{ assertions }*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const c = new C();
|
16
src/class-fields/default/cls-decl.template
Normal file
16
src/class-fields/default/cls-decl.template
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
path: language/expressions/class/class-field-
|
||||||
|
name: class fields
|
||||||
|
---*/
|
||||||
|
|
||||||
|
class C {
|
||||||
|
/*{ body }*/
|
||||||
|
constructor() {
|
||||||
|
/*{ assertions }*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const c = new C();
|
30
src/class-fields/double-empty-var.case
Normal file
30
src/class-fields/double-empty-var.case
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Empty var, empty var
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a; b;
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(this.b, undefined);
|
||||||
|
verifyEnumerable(this, "b");
|
||||||
|
verifyWritable(this, "b");
|
||||||
|
verifyConfigurable(this, "b");
|
25
src/class-fields/empty-string-var.case
Normal file
25
src/class-fields/empty-string-var.case
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Empty string var
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
'a';
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
29
src/class-fields/empty-var-computed-name-empty-function.case
Normal file
29
src/class-fields/empty-var-computed-name-empty-function.case
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: empty var, computed name empty function
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a; ['b'](){}
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
29
src/class-fields/empty-var-empty-function.case
Normal file
29
src/class-fields/empty-var-empty-function.case
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Empty var, empty function
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a; b(){}
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
29
src/class-fields/empty-var-generator-empty-function.case
Normal file
29
src/class-fields/empty-var-generator-empty-function.case
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Empty var, generator empty function
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a; *b(){}
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
25
src/class-fields/empty-var-new-line-asi.case
Normal file
25
src/class-fields/empty-var-new-line-asi.case
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: empty var and newline (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: empty var and newline, computed name empty function (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a
|
||||||
|
['b'](){}
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
29
src/class-fields/empty-var-new-line-empty-function-asi.case
Normal file
29
src/class-fields/empty-var-new-line-empty-function-asi.case
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: empty var and newline, empty function (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a
|
||||||
|
b(){}
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
@ -0,0 +1,31 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: empty var and newline, empty var and newline (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a
|
||||||
|
b
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(this.b, undefined);
|
||||||
|
verifyEnumerable(this, "b");
|
||||||
|
verifyWritable(this, "b");
|
||||||
|
verifyConfigurable(this, "b");
|
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: empty var and newline, generator empty function (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a
|
||||||
|
*b(){}
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
25
src/class-fields/empty-var.case
Normal file
25
src/class-fields/empty-var.case
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Empty var
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a;
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
25
src/class-fields/string-zero-initializer-var.case
Normal file
25
src/class-fields/string-zero-initializer-var.case
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: string var zero initializer
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
'a' = 0;
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
25
src/class-fields/undefined-initializer-var.case
Normal file
25
src/class-fields/undefined-initializer-var.case
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: Empty var
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a = undefined;
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, undefined);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
25
src/class-fields/yield-var.case
Normal file
25
src/class-fields/yield-var.case
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: yield var
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
yield
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.yield, undefined);
|
||||||
|
verifyEnumerable(this, "yield");
|
||||||
|
verifyWritable(this, "yield");
|
||||||
|
verifyConfigurable(this, "yield");
|
25
src/class-fields/yield-zero-initializer-var.case
Normal file
25
src/class-fields/yield-zero-initializer-var.case
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: yield var zero initialized
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
yield = 0
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.yield, 0);
|
||||||
|
verifyEnumerable(this, "yield");
|
||||||
|
verifyWritable(this, "yield");
|
||||||
|
verifyConfigurable(this, "yield");
|
25
src/class-fields/zero-empty-var.case
Normal file
25
src/class-fields/zero-empty-var.case
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: zero var
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
0;
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this["0"], undefined);
|
||||||
|
verifyEnumerable(this, "0");
|
||||||
|
verifyWritable(this, "0");
|
||||||
|
verifyConfigurable(this, "0");
|
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: zero initialized var, computed name empty function
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a = 0; ['b'](){}
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
29
src/class-fields/zero-initializer-var-empty-function.case
Normal file
29
src/class-fields/zero-initializer-var-empty-function.case
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: zero initialized var, empty function
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a = 0; b(){}
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
30
src/class-fields/zero-initializer-var-empty-var.case
Normal file
30
src/class-fields/zero-initializer-var-empty-var.case
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: zero initialized var, empty var
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a = 0; b
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(this.b, undefined);
|
||||||
|
verifyEnumerable(this, "b");
|
||||||
|
verifyWritable(this, "b");
|
||||||
|
verifyConfigurable(this, "b");
|
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: zero initialized var, generator empty function
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a = 0; *b(){}
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
25
src/class-fields/zero-initializer-var-new-line-asi.case
Normal file
25
src/class-fields/zero-initializer-var-new-line-asi.case
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: zero initialized var and newline (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a = 0
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
@ -0,0 +1,30 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: zero initialized var and newline, empty function (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a = 0
|
||||||
|
b(){}
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
|
||||||
|
verifyNotEnumerable(Object.getPrototypeOf(this), "b");
|
||||||
|
verifyConfigurable(Object.getPrototypeOf(this), "b");
|
@ -0,0 +1,31 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: zero initialized var and newline, empty var (ASI)
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a = 0
|
||||||
|
b
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
||||||
|
|
||||||
|
assert.sameValue(this.b, undefined);
|
||||||
|
verifyEnumerable(this, "b");
|
||||||
|
verifyWritable(this, "b");
|
||||||
|
verifyConfigurable(this, "b");
|
25
src/class-fields/zero-initializer-var.case
Normal file
25
src/class-fields/zero-initializer-var.case
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: zero initialized var
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
a = 0;
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this.a, 0);
|
||||||
|
verifyEnumerable(this, "a");
|
||||||
|
verifyWritable(this, "a");
|
||||||
|
verifyConfigurable(this, "a");
|
25
src/class-fields/zero-zero-initializer-var.case
Normal file
25
src/class-fields/zero-zero-initializer-var.case
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
desc: zero initialized zero var
|
||||||
|
info: |
|
||||||
|
1.1 New Productions
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
FieldDefinitionList [Yield, Await]:
|
||||||
|
FieldDefinition [?Yield, ?Await]
|
||||||
|
FieldDefinitionList [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
|
||||||
|
template: default
|
||||||
|
includes: [propertyHelper.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
//- body
|
||||||
|
0 = 0;
|
||||||
|
|
||||||
|
//- assertions
|
||||||
|
assert.sameValue(this["0"], 0);
|
||||||
|
verifyEnumerable(this, "0");
|
||||||
|
verifyWritable(this, "0");
|
||||||
|
verifyConfigurable(this, "0");
|
Loading…
x
Reference in New Issue
Block a user