Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/class/fields-regular-definitions-computed-symbol-names.js

raw
1 // This file was procedurally generated from the following sources:
2 // - src/class-fields/computed-symbol-names.case
3 // - src/class-fields/productions/cls-expr-regular-definitions.template
4 /*---
5 description: Computed property symbol names (regular fields defintion)
6 esid: prod-FieldDefinition
7 features: [Symbol, computed-property-names, class, class-fields-public]
8 flags: [generated]
9 includes: [propertyHelper.js]
10 info: |
11 ClassElement:
12 ...
13 FieldDefinition ;
14
15 FieldDefinition:
16 ClassElementName Initializer_opt
17
18 ClassElementName:
19 PropertyName
20
21 ---*/
22 var x = Symbol();
23 var y = Symbol();
24
25
26
27 var C = class {
28 [x]; [y] = 42
29
30 }
31
32 var c = new C();
33
34 assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false);
35 assert.sameValue(Object.hasOwnProperty.call(C, x), false);
36
37 verifyProperty(c, x, {
38 value: undefined,
39 enumerable: true,
40 writable: true,
41 configurable: true
42 });
43
44 assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false);
45 assert.sameValue(Object.hasOwnProperty.call(C, y), false);
46
47 verifyProperty(c, y, {
48 value: 42,
49 enumerable: true,
50 writable: true,
51 configurable: true
52 });
53
54 assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false);
55 assert.sameValue(Object.hasOwnProperty.call(C, "x"), false);
56 assert.sameValue(Object.hasOwnProperty.call(c, "x"), false);
57
58 assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false);
59 assert.sameValue(Object.hasOwnProperty.call(C, "y"), false);
60 assert.sameValue(Object.hasOwnProperty.call(c, "y"), false);