summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/class-fields/propname-error-static/cls-decl-static-field-initializer.template16
-rw-r--r--src/class-fields/propname-error-static/cls-decl-static-literal-name.template16
-rw-r--r--src/class-fields/propname-error-static/cls-expr-static-field-initializer.template16
-rw-r--r--src/class-fields/propname-error-static/cls-expr-static-literal-name.template16
-rw-r--r--src/class-fields/static-private-fields-forbidden.case11
-rw-r--r--src/class-fields/static-public-fields-forbidden.case11
6 files changed, 86 insertions, 0 deletions
diff --git a/src/class-fields/propname-error-static/cls-decl-static-field-initializer.template b/src/class-fields/propname-error-static/cls-decl-static-field-initializer.template
new file mode 100644
index 000000000..f51bd6b3f
--- /dev/null
+++ b/src/class-fields/propname-error-static/cls-decl-static-field-initializer.template
@@ -0,0 +1,16 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+path: language/statements/class/fields-initializer-
+name: early error -- static ClassElementName Initializer
+negative:
+ type: SyntaxError
+ phase: early
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+class C {
+ static /*{ propname }*/ = 0;
+}
diff --git a/src/class-fields/propname-error-static/cls-decl-static-literal-name.template b/src/class-fields/propname-error-static/cls-decl-static-literal-name.template
new file mode 100644
index 000000000..bba9b7d15
--- /dev/null
+++ b/src/class-fields/propname-error-static/cls-decl-static-literal-name.template
@@ -0,0 +1,16 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+path: language/statements/class/fields-prop-name-
+name: early error -- static ClassElementName
+negative:
+ type: SyntaxError
+ phase: early
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+class C {
+ static /*{ propname }*/;
+}
diff --git a/src/class-fields/propname-error-static/cls-expr-static-field-initializer.template b/src/class-fields/propname-error-static/cls-expr-static-field-initializer.template
new file mode 100644
index 000000000..c59ae1a64
--- /dev/null
+++ b/src/class-fields/propname-error-static/cls-expr-static-field-initializer.template
@@ -0,0 +1,16 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+path: language/expressions/class/fields-initializer-
+name: early error -- static ClassElementName Initializer
+negative:
+ type: SyntaxError
+ phase: early
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+var C = class {
+ static /*{ propname }*/ = 0;
+};
diff --git a/src/class-fields/propname-error-static/cls-expr-static-literal-name.template b/src/class-fields/propname-error-static/cls-expr-static-literal-name.template
new file mode 100644
index 000000000..e83ef26a3
--- /dev/null
+++ b/src/class-fields/propname-error-static/cls-expr-static-literal-name.template
@@ -0,0 +1,16 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+path: language/expressions/class/fields-prop-name-
+name: early error -- static ClassElementName
+negative:
+ type: SyntaxError
+ phase: early
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+var C = class {
+ static /*{ propname }*/;
+};
diff --git a/src/class-fields/static-private-fields-forbidden.case b/src/class-fields/static-private-fields-forbidden.case
new file mode 100644
index 000000000..5130caf9a
--- /dev/null
+++ b/src/class-fields/static-private-fields-forbidden.case
@@ -0,0 +1,11 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+desc: static private class fields forbidden
+features: [class, class-fields-private]
+template: propname-error-static
+---*/
+
+//- propname
+#field
diff --git a/src/class-fields/static-public-fields-forbidden.case b/src/class-fields/static-public-fields-forbidden.case
new file mode 100644
index 000000000..f5390bf74
--- /dev/null
+++ b/src/class-fields/static-public-fields-forbidden.case
@@ -0,0 +1,11 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+desc: static public class fields forbidden
+features: [class, class-fields-public]
+template: propname-error-static
+---*/
+
+//- propname
+field