summaryrefslogtreecommitdiff
path: root/src/class-fields/computed-name-zero-initializer-var-computed-name-empty-function.case
diff options
context:
space:
mode:
Diffstat (limited to 'src/class-fields/computed-name-zero-initializer-var-computed-name-empty-function.case')
-rw-r--r--src/class-fields/computed-name-zero-initializer-var-computed-name-empty-function.case29
1 files changed, 29 insertions, 0 deletions
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");