summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXan López <xan@igalia.com>2017-06-14 16:43:45 +0200
committerRick Waldron <waldron.rick@gmail.com>2017-07-13 14:43:06 -0400
commite731114cff0a59936c5117f42d2d618c19920fb6 (patch)
tree51f199b07814e1d0cc28738d29650b30cc82845c /src
parent953992d235909577e4dd997672be4f2e223e6f6c (diff)
downloadqtdeclarative-testsuites-e731114cff0a59936c5117f42d2d618c19920fb6.tar.gz
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
Diffstat (limited to 'src')
-rw-r--r--src/class-fields/computed-name-empty-var-computed-name-empty-function.case29
-rw-r--r--src/class-fields/computed-name-empty-var-empty-function.case29
-rw-r--r--src/class-fields/computed-name-empty-var-empty-var.case30
-rw-r--r--src/class-fields/computed-name-empty-var-generator-empty-function.case29
-rw-r--r--src/class-fields/computed-name-empty-var-new-line-asi.case25
-rw-r--r--src/class-fields/computed-name-empty-var-new-line-computed-name-empty-function-asi.case29
-rw-r--r--src/class-fields/computed-name-empty-var-new-line-empty-function-asi.case29
-rw-r--r--src/class-fields/computed-name-empty-var-new-line-empty-var-asi.case30
-rw-r--r--src/class-fields/computed-name-empty-var-new-line-generator-empty-function-asi.case29
-rw-r--r--src/class-fields/computed-name-empty-var.case25
-rw-r--r--src/class-fields/computed-name-zero-initializer-new-line-empty-bar-asi.case30
-rw-r--r--src/class-fields/computed-name-zero-initializer-new-line-empty-function-asi.case29
-rw-r--r--src/class-fields/computed-name-zero-initializer-new-line-empty-var-asi.case30
-rw-r--r--src/class-fields/computed-name-zero-initializer-var-computed-name-empty-function.case29
-rw-r--r--src/class-fields/computed-name-zero-initializer-var-empty-function.case29
-rw-r--r--src/class-fields/computed-name-zero-initializer-var-empty-var.case30
-rw-r--r--src/class-fields/computed-name-zero-initializer-var-generator-empty-function.case29
-rw-r--r--src/class-fields/computed-name-zero-initializer-var-new-line-asi.case25
-rw-r--r--src/class-fields/computed-name-zero-initializer-var.case25
-rw-r--r--src/class-fields/default/cls-decl-extends.template18
-rw-r--r--src/class-fields/default/cls-decl.template16
-rw-r--r--src/class-fields/double-empty-var.case30
-rw-r--r--src/class-fields/empty-string-var.case25
-rw-r--r--src/class-fields/empty-var-computed-name-empty-function.case29
-rw-r--r--src/class-fields/empty-var-empty-function.case29
-rw-r--r--src/class-fields/empty-var-generator-empty-function.case29
-rw-r--r--src/class-fields/empty-var-new-line-asi.case25
-rw-r--r--src/class-fields/empty-var-new-line-computed-name-function-asi.case29
-rw-r--r--src/class-fields/empty-var-new-line-empty-function-asi.case29
-rw-r--r--src/class-fields/empty-var-new-line-empty-var-new-line-asi.case31
-rw-r--r--src/class-fields/empty-var-new-line-generator-empty-function-asi.case29
-rw-r--r--src/class-fields/empty-var.case25
-rw-r--r--src/class-fields/string-zero-initializer-var.case25
-rw-r--r--src/class-fields/undefined-initializer-var.case25
-rw-r--r--src/class-fields/yield-var.case25
-rw-r--r--src/class-fields/yield-zero-initializer-var.case25
-rw-r--r--src/class-fields/zero-empty-var.case25
-rw-r--r--src/class-fields/zero-initializer-var-computed-name-empty-function.case29
-rw-r--r--src/class-fields/zero-initializer-var-empty-function.case29
-rw-r--r--src/class-fields/zero-initializer-var-empty-var.case30
-rw-r--r--src/class-fields/zero-initializer-var-generator-empty-function.case29
-rw-r--r--src/class-fields/zero-initializer-var-new-line-asi.case25
-rw-r--r--src/class-fields/zero-initializer-var-new-line-empty-function-asi.case30
-rw-r--r--src/class-fields/zero-initializer-var-new-line-empty-var-asi.case31
-rw-r--r--src/class-fields/zero-initializer-var.case25
-rw-r--r--src/class-fields/zero-zero-initializer-var.case25
46 files changed, 1262 insertions, 0 deletions
diff --git a/src/class-fields/computed-name-empty-var-computed-name-empty-function.case b/src/class-fields/computed-name-empty-var-computed-name-empty-function.case
new file mode 100644
index 000000000..a6aed9f89
--- /dev/null
+++ b/src/class-fields/computed-name-empty-var-computed-name-empty-function.case
@@ -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");
diff --git a/src/class-fields/computed-name-empty-var-empty-function.case b/src/class-fields/computed-name-empty-var-empty-function.case
new file mode 100644
index 000000000..5feacdca3
--- /dev/null
+++ b/src/class-fields/computed-name-empty-var-empty-function.case
@@ -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");
diff --git a/src/class-fields/computed-name-empty-var-empty-var.case b/src/class-fields/computed-name-empty-var-empty-var.case
new file mode 100644
index 000000000..af98e9c96
--- /dev/null
+++ b/src/class-fields/computed-name-empty-var-empty-var.case
@@ -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");
diff --git a/src/class-fields/computed-name-empty-var-generator-empty-function.case b/src/class-fields/computed-name-empty-var-generator-empty-function.case
new file mode 100644
index 000000000..39a1de7de
--- /dev/null
+++ b/src/class-fields/computed-name-empty-var-generator-empty-function.case
@@ -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");
diff --git a/src/class-fields/computed-name-empty-var-new-line-asi.case b/src/class-fields/computed-name-empty-var-new-line-asi.case
new file mode 100644
index 000000000..84e9e7d06
--- /dev/null
+++ b/src/class-fields/computed-name-empty-var-new-line-asi.case
@@ -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");
diff --git a/src/class-fields/computed-name-empty-var-new-line-computed-name-empty-function-asi.case b/src/class-fields/computed-name-empty-var-new-line-computed-name-empty-function-asi.case
new file mode 100644
index 000000000..93d034fad
--- /dev/null
+++ b/src/class-fields/computed-name-empty-var-new-line-computed-name-empty-function-asi.case
@@ -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");
diff --git a/src/class-fields/computed-name-empty-var-new-line-empty-function-asi.case b/src/class-fields/computed-name-empty-var-new-line-empty-function-asi.case
new file mode 100644
index 000000000..d908715a1
--- /dev/null
+++ b/src/class-fields/computed-name-empty-var-new-line-empty-function-asi.case
@@ -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");
diff --git a/src/class-fields/computed-name-empty-var-new-line-empty-var-asi.case b/src/class-fields/computed-name-empty-var-new-line-empty-var-asi.case
new file mode 100644
index 000000000..139ac66ee
--- /dev/null
+++ b/src/class-fields/computed-name-empty-var-new-line-empty-var-asi.case
@@ -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");
diff --git a/src/class-fields/computed-name-empty-var-new-line-generator-empty-function-asi.case b/src/class-fields/computed-name-empty-var-new-line-generator-empty-function-asi.case
new file mode 100644
index 000000000..f5cbdbc62
--- /dev/null
+++ b/src/class-fields/computed-name-empty-var-new-line-generator-empty-function-asi.case
@@ -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");
diff --git a/src/class-fields/computed-name-empty-var.case b/src/class-fields/computed-name-empty-var.case
new file mode 100644
index 000000000..5a2c3b0e4
--- /dev/null
+++ b/src/class-fields/computed-name-empty-var.case
@@ -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");
diff --git a/src/class-fields/computed-name-zero-initializer-new-line-empty-bar-asi.case b/src/class-fields/computed-name-zero-initializer-new-line-empty-bar-asi.case
new file mode 100644
index 000000000..76cfe5ab4
--- /dev/null
+++ b/src/class-fields/computed-name-zero-initializer-new-line-empty-bar-asi.case
@@ -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");
diff --git a/src/class-fields/computed-name-zero-initializer-new-line-empty-function-asi.case b/src/class-fields/computed-name-zero-initializer-new-line-empty-function-asi.case
new file mode 100644
index 000000000..ea66279a7
--- /dev/null
+++ b/src/class-fields/computed-name-zero-initializer-new-line-empty-function-asi.case
@@ -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");
diff --git a/src/class-fields/computed-name-zero-initializer-new-line-empty-var-asi.case b/src/class-fields/computed-name-zero-initializer-new-line-empty-var-asi.case
new file mode 100644
index 000000000..76cfe5ab4
--- /dev/null
+++ b/src/class-fields/computed-name-zero-initializer-new-line-empty-var-asi.case
@@ -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");
diff --git a/src/class-fields/computed-name-zero-initializer-var-computed-name-empty-function.case b/src/class-fields/computed-name-zero-initializer-var-computed-name-empty-function.case
new file mode 100644
index 000000000..58a136c03
--- /dev/null
+++ b/src/class-fields/computed-name-zero-initializer-var-computed-name-empty-function.case
@@ -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");
diff --git a/src/class-fields/computed-name-zero-initializer-var-empty-function.case b/src/class-fields/computed-name-zero-initializer-var-empty-function.case
new file mode 100644
index 000000000..9b11074b7
--- /dev/null
+++ b/src/class-fields/computed-name-zero-initializer-var-empty-function.case
@@ -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");
diff --git a/src/class-fields/computed-name-zero-initializer-var-empty-var.case b/src/class-fields/computed-name-zero-initializer-var-empty-var.case
new file mode 100644
index 000000000..5653b8d5b
--- /dev/null
+++ b/src/class-fields/computed-name-zero-initializer-var-empty-var.case
@@ -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");
diff --git a/src/class-fields/computed-name-zero-initializer-var-generator-empty-function.case b/src/class-fields/computed-name-zero-initializer-var-generator-empty-function.case
new file mode 100644
index 000000000..c4ac67230
--- /dev/null
+++ b/src/class-fields/computed-name-zero-initializer-var-generator-empty-function.case
@@ -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");
diff --git a/src/class-fields/computed-name-zero-initializer-var-new-line-asi.case b/src/class-fields/computed-name-zero-initializer-var-new-line-asi.case
new file mode 100644
index 000000000..8fe58c0be
--- /dev/null
+++ b/src/class-fields/computed-name-zero-initializer-var-new-line-asi.case
@@ -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");
diff --git a/src/class-fields/computed-name-zero-initializer-var.case b/src/class-fields/computed-name-zero-initializer-var.case
new file mode 100644
index 000000000..c2dc168eb
--- /dev/null
+++ b/src/class-fields/computed-name-zero-initializer-var.case
@@ -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");
diff --git a/src/class-fields/default/cls-decl-extends.template b/src/class-fields/default/cls-decl-extends.template
new file mode 100644
index 000000000..2cc6dd63f
--- /dev/null
+++ b/src/class-fields/default/cls-decl-extends.template
@@ -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();
diff --git a/src/class-fields/default/cls-decl.template b/src/class-fields/default/cls-decl.template
new file mode 100644
index 000000000..92dcfd74e
--- /dev/null
+++ b/src/class-fields/default/cls-decl.template
@@ -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();
diff --git a/src/class-fields/double-empty-var.case b/src/class-fields/double-empty-var.case
new file mode 100644
index 000000000..6da771449
--- /dev/null
+++ b/src/class-fields/double-empty-var.case
@@ -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");
diff --git a/src/class-fields/empty-string-var.case b/src/class-fields/empty-string-var.case
new file mode 100644
index 000000000..86666052f
--- /dev/null
+++ b/src/class-fields/empty-string-var.case
@@ -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");
diff --git a/src/class-fields/empty-var-computed-name-empty-function.case b/src/class-fields/empty-var-computed-name-empty-function.case
new file mode 100644
index 000000000..3a56f2179
--- /dev/null
+++ b/src/class-fields/empty-var-computed-name-empty-function.case
@@ -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");
diff --git a/src/class-fields/empty-var-empty-function.case b/src/class-fields/empty-var-empty-function.case
new file mode 100644
index 000000000..43b39b27c
--- /dev/null
+++ b/src/class-fields/empty-var-empty-function.case
@@ -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");
diff --git a/src/class-fields/empty-var-generator-empty-function.case b/src/class-fields/empty-var-generator-empty-function.case
new file mode 100644
index 000000000..a9f86fa45
--- /dev/null
+++ b/src/class-fields/empty-var-generator-empty-function.case
@@ -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");
diff --git a/src/class-fields/empty-var-new-line-asi.case b/src/class-fields/empty-var-new-line-asi.case
new file mode 100644
index 000000000..0c68ce995
--- /dev/null
+++ b/src/class-fields/empty-var-new-line-asi.case
@@ -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");
diff --git a/src/class-fields/empty-var-new-line-computed-name-function-asi.case b/src/class-fields/empty-var-new-line-computed-name-function-asi.case
new file mode 100644
index 000000000..fe9551455
--- /dev/null
+++ b/src/class-fields/empty-var-new-line-computed-name-function-asi.case
@@ -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");
diff --git a/src/class-fields/empty-var-new-line-empty-function-asi.case b/src/class-fields/empty-var-new-line-empty-function-asi.case
new file mode 100644
index 000000000..7002cab0c
--- /dev/null
+++ b/src/class-fields/empty-var-new-line-empty-function-asi.case
@@ -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");
diff --git a/src/class-fields/empty-var-new-line-empty-var-new-line-asi.case b/src/class-fields/empty-var-new-line-empty-var-new-line-asi.case
new file mode 100644
index 000000000..c58ef2756
--- /dev/null
+++ b/src/class-fields/empty-var-new-line-empty-var-new-line-asi.case
@@ -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");
diff --git a/src/class-fields/empty-var-new-line-generator-empty-function-asi.case b/src/class-fields/empty-var-new-line-generator-empty-function-asi.case
new file mode 100644
index 000000000..816bb591b
--- /dev/null
+++ b/src/class-fields/empty-var-new-line-generator-empty-function-asi.case
@@ -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");
diff --git a/src/class-fields/empty-var.case b/src/class-fields/empty-var.case
new file mode 100644
index 000000000..43392b65b
--- /dev/null
+++ b/src/class-fields/empty-var.case
@@ -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");
diff --git a/src/class-fields/string-zero-initializer-var.case b/src/class-fields/string-zero-initializer-var.case
new file mode 100644
index 000000000..a6ab7c7f8
--- /dev/null
+++ b/src/class-fields/string-zero-initializer-var.case
@@ -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");
diff --git a/src/class-fields/undefined-initializer-var.case b/src/class-fields/undefined-initializer-var.case
new file mode 100644
index 000000000..391bdb3ee
--- /dev/null
+++ b/src/class-fields/undefined-initializer-var.case
@@ -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");
diff --git a/src/class-fields/yield-var.case b/src/class-fields/yield-var.case
new file mode 100644
index 000000000..abc30f2fe
--- /dev/null
+++ b/src/class-fields/yield-var.case
@@ -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");
diff --git a/src/class-fields/yield-zero-initializer-var.case b/src/class-fields/yield-zero-initializer-var.case
new file mode 100644
index 000000000..e677466bf
--- /dev/null
+++ b/src/class-fields/yield-zero-initializer-var.case
@@ -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");
diff --git a/src/class-fields/zero-empty-var.case b/src/class-fields/zero-empty-var.case
new file mode 100644
index 000000000..ae2135648
--- /dev/null
+++ b/src/class-fields/zero-empty-var.case
@@ -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");
diff --git a/src/class-fields/zero-initializer-var-computed-name-empty-function.case b/src/class-fields/zero-initializer-var-computed-name-empty-function.case
new file mode 100644
index 000000000..195626c74
--- /dev/null
+++ b/src/class-fields/zero-initializer-var-computed-name-empty-function.case
@@ -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");
diff --git a/src/class-fields/zero-initializer-var-empty-function.case b/src/class-fields/zero-initializer-var-empty-function.case
new file mode 100644
index 000000000..d6033029c
--- /dev/null
+++ b/src/class-fields/zero-initializer-var-empty-function.case
@@ -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");
diff --git a/src/class-fields/zero-initializer-var-empty-var.case b/src/class-fields/zero-initializer-var-empty-var.case
new file mode 100644
index 000000000..93a794095
--- /dev/null
+++ b/src/class-fields/zero-initializer-var-empty-var.case
@@ -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");
diff --git a/src/class-fields/zero-initializer-var-generator-empty-function.case b/src/class-fields/zero-initializer-var-generator-empty-function.case
new file mode 100644
index 000000000..688d24e60
--- /dev/null
+++ b/src/class-fields/zero-initializer-var-generator-empty-function.case
@@ -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");
diff --git a/src/class-fields/zero-initializer-var-new-line-asi.case b/src/class-fields/zero-initializer-var-new-line-asi.case
new file mode 100644
index 000000000..f4144acf0
--- /dev/null
+++ b/src/class-fields/zero-initializer-var-new-line-asi.case
@@ -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");
diff --git a/src/class-fields/zero-initializer-var-new-line-empty-function-asi.case b/src/class-fields/zero-initializer-var-new-line-empty-function-asi.case
new file mode 100644
index 000000000..8a3c24a85
--- /dev/null
+++ b/src/class-fields/zero-initializer-var-new-line-empty-function-asi.case
@@ -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");
diff --git a/src/class-fields/zero-initializer-var-new-line-empty-var-asi.case b/src/class-fields/zero-initializer-var-new-line-empty-var-asi.case
new file mode 100644
index 000000000..46c13df92
--- /dev/null
+++ b/src/class-fields/zero-initializer-var-new-line-empty-var-asi.case
@@ -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");
diff --git a/src/class-fields/zero-initializer-var.case b/src/class-fields/zero-initializer-var.case
new file mode 100644
index 000000000..b2f10211c
--- /dev/null
+++ b/src/class-fields/zero-initializer-var.case
@@ -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");
diff --git a/src/class-fields/zero-zero-initializer-var.case b/src/class-fields/zero-zero-initializer-var.case
new file mode 100644
index 000000000..64ad15f90
--- /dev/null
+++ b/src/class-fields/zero-zero-initializer-var.case
@@ -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");