Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/class/fields-wrapped-in-sc-string-literal-names.js

raw
1 // This file was procedurally generated from the following sources:
2 // - src/class-fields/string-literal-names.case
3 // - src/class-fields/productions/cls-expr-wrapped-in-sc.template
4 /*---
5 description: String literal names (fields definition wrapped in semicolons)
6 esid: prod-FieldDefinition
7 features: [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
23
24 var C = class {
25 ;;;;
26 ;;;;;;'a'; "b"; 'c' = 39;
27 "d" = 42;;;;;;;
28 ;;;;
29
30 }
31
32 var c = new C();
33
34 assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false);
35 assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
36
37 verifyProperty(c, "a", {
38 value: undefined,
39 enumerable: true,
40 writable: true,
41 configurable: true
42 });
43
44 assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false);
45 assert.sameValue(Object.hasOwnProperty.call(C, "b"), false);
46
47 verifyProperty(c, "b", {
48 value: undefined,
49 enumerable: true,
50 writable: true,
51 configurable: true
52 });
53
54 assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false);
55 assert.sameValue(Object.hasOwnProperty.call(C, "c"), false);
56
57 verifyProperty(c, "c", {
58 value: 39,
59 enumerable: true,
60 writable: true,
61 configurable: true
62 });
63
64 assert.sameValue(Object.hasOwnProperty.call(C.prototype, "d"), false);
65 assert.sameValue(Object.hasOwnProperty.call(C, "d"), false);
66
67 verifyProperty(c, "d", {
68 value: 42,
69 enumerable: true,
70 writable: true,
71 configurable: true
72 });