From 3f2a2aa4649675905d168bad620528a8a56b5654 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Fri, 25 Sep 2020 13:21:51 -0400 Subject: [PATCH] Generate tests --- ...ted-property-name-from-await-expression.js | 74 +++++++++++++++++++ ...ted-property-name-from-await-expression.js | 56 ++++++++++++++ ...ted-property-name-from-await-expression.js | 53 +++++++++++++ ...ted-property-name-from-await-expression.js | 57 ++++++++++++++ ...ted-property-name-from-await-expression.js | 34 +++++++++ ...ted-property-name-from-await-expression.js | 34 +++++++++ ...ted-property-name-from-await-expression.js | 74 +++++++++++++++++++ ...ted-property-name-from-await-expression.js | 56 ++++++++++++++ ...ted-property-name-from-await-expression.js | 53 +++++++++++++ ...ted-property-name-from-await-expression.js | 57 ++++++++++++++ 10 files changed, 548 insertions(+) create mode 100644 test/language/expressions/class/cpn-class-expr-accessors-computed-property-name-from-await-expression.js create mode 100644 test/language/expressions/class/cpn-class-expr-computed-property-name-from-await-expression.js create mode 100644 test/language/expressions/class/cpn-class-expr-fields-computed-property-name-from-await-expression.js create mode 100644 test/language/expressions/class/cpn-class-expr-fields-methods-computed-property-name-from-await-expression.js create mode 100644 test/language/expressions/object/cpn-obj-lit-computed-property-name-from-await-expression.js create mode 100644 test/language/expressions/object/cpn-yield-expr-computed-property-name-from-await-expression.js create mode 100644 test/language/statements/class/cpn-class-decl-accessors-computed-property-name-from-await-expression.js create mode 100644 test/language/statements/class/cpn-class-decl-computed-property-name-from-await-expression.js create mode 100644 test/language/statements/class/cpn-class-decl-fields-computed-property-name-from-await-expression.js create mode 100644 test/language/statements/class/cpn-class-decl-fields-methods-computed-property-name-from-await-expression.js diff --git a/test/language/expressions/class/cpn-class-expr-accessors-computed-property-name-from-await-expression.js b/test/language/expressions/class/cpn-class-expr-accessors-computed-property-name-from-await-expression.js new file mode 100644 index 0000000000..ca3f0ecccf --- /dev/null +++ b/test/language/expressions/class/cpn-class-expr-accessors-computed-property-name-from-await-expression.js @@ -0,0 +1,74 @@ +// This file was procedurally generated from the following sources: +// - src/computed-property-names/computed-property-name-from-await-expression.case +// - src/computed-property-names/evaluation/class-expression-accessors.template +/*--- +description: Computed property name from condition expression (ComputedPropertyName in ClassExpression) +esid: prod-ComputedPropertyName +features: [computed-property-names, top-level-await] +flags: [generated, module] +info: | + ClassExpression: + classBindingIdentifier opt ClassTail + + ClassTail: + ClassHeritage opt { ClassBody opt } + + ClassBody: + ClassElementList + + ClassElementList: + ClassElement + + ClassElement: + MethodDefinition + + MethodDefinition: + PropertyName ... + get PropertyName ... + set PropertyName ... + + PropertyName: + ComputedPropertyName + + ComputedPropertyName: + [ AssignmentExpression ] +---*/ + + +let C = class { + get [await 9]() { + return 9; + } + + set [await 9](v) { + return 9; + } + + static get [await 9]() { + return 9; + } + + static set [await 9](v) { + return 9; + } +}; + +let c = new C(); + +assert.sameValue( + c[await 9], + 9 +); +assert.sameValue( + c[await 9] = 9, + 9 +); + +assert.sameValue( + C[await 9], + 9 +); +assert.sameValue( + C[await 9] = 9, + 9 +); diff --git a/test/language/expressions/class/cpn-class-expr-computed-property-name-from-await-expression.js b/test/language/expressions/class/cpn-class-expr-computed-property-name-from-await-expression.js new file mode 100644 index 0000000000..12c27e1b00 --- /dev/null +++ b/test/language/expressions/class/cpn-class-expr-computed-property-name-from-await-expression.js @@ -0,0 +1,56 @@ +// This file was procedurally generated from the following sources: +// - src/computed-property-names/computed-property-name-from-await-expression.case +// - src/computed-property-names/evaluation/class-expression.template +/*--- +description: Computed property name from condition expression (ComputedPropertyName in ClassExpression) +esid: prod-ComputedPropertyName +features: [computed-property-names, top-level-await] +flags: [generated, module] +info: | + ClassExpression: + classBindingIdentifier opt ClassTail + + ClassTail: + ClassHeritage opt { ClassBody opt } + + ClassBody: + ClassElementList + + ClassElementList: + ClassElement + + ClassElement: + MethodDefinition + + MethodDefinition: + PropertyName ... + get PropertyName ... + set PropertyName ... + + PropertyName: + ComputedPropertyName + + ComputedPropertyName: + [ AssignmentExpression ] +---*/ + + +let C = class { + [await 9]() { + return 9; + } + static [await 9]() { + return 9; + } +}; + +let c = new C(); + +assert.sameValue( + c[await 9](), + 9 +); +assert.sameValue( + C[await 9](), + 9 +); diff --git a/test/language/expressions/class/cpn-class-expr-fields-computed-property-name-from-await-expression.js b/test/language/expressions/class/cpn-class-expr-fields-computed-property-name-from-await-expression.js new file mode 100644 index 0000000000..adbe81f228 --- /dev/null +++ b/test/language/expressions/class/cpn-class-expr-fields-computed-property-name-from-await-expression.js @@ -0,0 +1,53 @@ +// This file was procedurally generated from the following sources: +// - src/computed-property-names/computed-property-name-from-await-expression.case +// - src/computed-property-names/evaluation/class-expression-fields.template +/*--- +description: Computed property name from condition expression (ComputedPropertyName in ClassExpression) +esid: prod-ComputedPropertyName +features: [computed-property-names, top-level-await] +flags: [generated, module] +info: | + ClassExpression: + classBindingIdentifier opt ClassTail + + ClassTail: + ClassHeritage opt { ClassBody opt } + + ClassBody: + ClassElementList + + ClassElementList: + ClassElement + + ClassElement: + MethodDefinition + + MethodDefinition: + PropertyName ... + get PropertyName ... + set PropertyName ... + + PropertyName: + ComputedPropertyName + + ComputedPropertyName: + [ AssignmentExpression ] +---*/ + + +let C = class { + [await 9] = 9; + + static [await 9] = 9; +}; + +let c = new C(); + +assert.sameValue( + c[await 9], + 9 +); +assert.sameValue( + C[await 9], + 9 +); diff --git a/test/language/expressions/class/cpn-class-expr-fields-methods-computed-property-name-from-await-expression.js b/test/language/expressions/class/cpn-class-expr-fields-methods-computed-property-name-from-await-expression.js new file mode 100644 index 0000000000..781bd4d8cf --- /dev/null +++ b/test/language/expressions/class/cpn-class-expr-fields-methods-computed-property-name-from-await-expression.js @@ -0,0 +1,57 @@ +// This file was procedurally generated from the following sources: +// - src/computed-property-names/computed-property-name-from-await-expression.case +// - src/computed-property-names/evaluation/class-expression-fields-methods.template +/*--- +description: Computed property name from condition expression (ComputedPropertyName in ClassExpression) +esid: prod-ComputedPropertyName +features: [computed-property-names, top-level-await] +flags: [generated, module] +info: | + ClassExpression: + classBindingIdentifier opt ClassTail + + ClassTail: + ClassHeritage opt { ClassBody opt } + + ClassBody: + ClassElementList + + ClassElementList: + ClassElement + + ClassElement: + MethodDefinition + + MethodDefinition: + PropertyName ... + get PropertyName ... + set PropertyName ... + + PropertyName: + ComputedPropertyName + + ComputedPropertyName: + [ AssignmentExpression ] +---*/ + + +let C = class { + [await 9] = () => { + return 9; + }; + + static [await 9] = () => { + return 9; + }; +}; + +let c = new C(); + +assert.sameValue( + c[await 9](), + 9 +); +assert.sameValue( + C[await 9](), + 9 +); diff --git a/test/language/expressions/object/cpn-obj-lit-computed-property-name-from-await-expression.js b/test/language/expressions/object/cpn-obj-lit-computed-property-name-from-await-expression.js new file mode 100644 index 0000000000..ef644ded6b --- /dev/null +++ b/test/language/expressions/object/cpn-obj-lit-computed-property-name-from-await-expression.js @@ -0,0 +1,34 @@ +// This file was procedurally generated from the following sources: +// - src/computed-property-names/computed-property-name-from-await-expression.case +// - src/computed-property-names/evaluation/object-literal.template +/*--- +description: Computed property name from condition expression (ComputedPropertyName in ObjectLiteral) +esid: prod-ComputedPropertyName +features: [computed-property-names, top-level-await] +flags: [generated, module] +info: | + ObjectLiteral: + { PropertyDefinitionList } + + PropertyDefinitionList: + PropertyDefinition + + PropertyDefinition: + PropertyName: AssignmentExpression + + PropertyName: + ComputedPropertyName + + ComputedPropertyName: + [ AssignmentExpression ] +---*/ + + +let o = { + [await 9]: 9 +}; + +assert.sameValue( + o[await 9], + 9 +); diff --git a/test/language/expressions/object/cpn-yield-expr-computed-property-name-from-await-expression.js b/test/language/expressions/object/cpn-yield-expr-computed-property-name-from-await-expression.js new file mode 100644 index 0000000000..6ace25db5e --- /dev/null +++ b/test/language/expressions/object/cpn-yield-expr-computed-property-name-from-await-expression.js @@ -0,0 +1,34 @@ +// This file was procedurally generated from the following sources: +// - src/computed-property-names/computed-property-name-from-await-expression.case +// - src/computed-property-names/evaluation/yield-expression.template +/*--- +description: Computed property name from condition expression (ComputedPropertyName in ObjectLiteral) +esid: prod-ComputedPropertyName +features: [computed-property-names, top-level-await] +flags: [generated, module] +info: | + ObjectLiteral: + { PropertyDefinitionList } + + PropertyDefinitionList: + PropertyDefinition + + PropertyDefinition: + PropertyName: AssignmentExpression + + PropertyName: + ComputedPropertyName + + ComputedPropertyName: + [ AssignmentExpression ] +---*/ + + +let o = { + [await 9]: 9 +}; + +assert.sameValue( + o[await 9], + 9 +); diff --git a/test/language/statements/class/cpn-class-decl-accessors-computed-property-name-from-await-expression.js b/test/language/statements/class/cpn-class-decl-accessors-computed-property-name-from-await-expression.js new file mode 100644 index 0000000000..a053165d54 --- /dev/null +++ b/test/language/statements/class/cpn-class-decl-accessors-computed-property-name-from-await-expression.js @@ -0,0 +1,74 @@ +// This file was procedurally generated from the following sources: +// - src/computed-property-names/computed-property-name-from-await-expression.case +// - src/computed-property-names/evaluation/class-declaration-accessors.template +/*--- +description: Computed property name from condition expression (ComputedPropertyName in ClassDeclaration) +esid: prod-ComputedPropertyName +features: [computed-property-names, top-level-await] +flags: [generated, module] +info: | + ClassExpression: + classBindingIdentifier opt ClassTail + + ClassTail: + ClassHeritage opt { ClassBody opt } + + ClassBody: + ClassElementList + + ClassElementList: + ClassElement + + ClassElement: + MethodDefinition + + MethodDefinition: + PropertyName ... + get PropertyName ... + set PropertyName ... + + PropertyName: + ComputedPropertyName + + ComputedPropertyName: + [ AssignmentExpression ] +---*/ + + +class C { + get [await 9]() { + return 9; + } + + set [await 9](v) { + return 9; + } + + static get [await 9]() { + return 9; + } + + static set [await 9](v) { + return 9; + } +}; + +let c = new C(); + +assert.sameValue( + c[await 9], + 9 +); +assert.sameValue( + c[await 9] = 9, + 9 +); + +assert.sameValue( + C[await 9], + 9 +); +assert.sameValue( + C[await 9] = 9, + 9 +); diff --git a/test/language/statements/class/cpn-class-decl-computed-property-name-from-await-expression.js b/test/language/statements/class/cpn-class-decl-computed-property-name-from-await-expression.js new file mode 100644 index 0000000000..dba2d443d6 --- /dev/null +++ b/test/language/statements/class/cpn-class-decl-computed-property-name-from-await-expression.js @@ -0,0 +1,56 @@ +// This file was procedurally generated from the following sources: +// - src/computed-property-names/computed-property-name-from-await-expression.case +// - src/computed-property-names/evaluation/class-declaration.template +/*--- +description: Computed property name from condition expression (ComputedPropertyName in ClassDeclaration) +esid: prod-ComputedPropertyName +features: [computed-property-names, top-level-await] +flags: [generated, module] +info: | + ClassExpression: + classBindingIdentifier opt ClassTail + + ClassTail: + ClassHeritage opt { ClassBody opt } + + ClassBody: + ClassElementList + + ClassElementList: + ClassElement + + ClassElement: + MethodDefinition + + MethodDefinition: + PropertyName ... + get PropertyName ... + set PropertyName ... + + PropertyName: + ComputedPropertyName + + ComputedPropertyName: + [ AssignmentExpression ] +---*/ + + +class C { + [await 9]() { + return 9; + } + static [await 9]() { + return 9; + } +}; + +let c = new C(); + +assert.sameValue( + c[await 9](), + 9 +); +assert.sameValue( + C[await 9](), + 9 +); diff --git a/test/language/statements/class/cpn-class-decl-fields-computed-property-name-from-await-expression.js b/test/language/statements/class/cpn-class-decl-fields-computed-property-name-from-await-expression.js new file mode 100644 index 0000000000..7b4076beb4 --- /dev/null +++ b/test/language/statements/class/cpn-class-decl-fields-computed-property-name-from-await-expression.js @@ -0,0 +1,53 @@ +// This file was procedurally generated from the following sources: +// - src/computed-property-names/computed-property-name-from-await-expression.case +// - src/computed-property-names/evaluation/class-declaration-fields.template +/*--- +description: Computed property name from condition expression (ComputedPropertyName in ClassExpression) +esid: prod-ComputedPropertyName +features: [computed-property-names, top-level-await] +flags: [generated, module] +info: | + ClassExpression: + classBindingIdentifier opt ClassTail + + ClassTail: + ClassHeritage opt { ClassBody opt } + + ClassBody: + ClassElementList + + ClassElementList: + ClassElement + + ClassElement: + MethodDefinition + + MethodDefinition: + PropertyName ... + get PropertyName ... + set PropertyName ... + + PropertyName: + ComputedPropertyName + + ComputedPropertyName: + [ AssignmentExpression ] +---*/ + + +let C = class { + [await 9] = 9; + + static [await 9] = 9; +}; + +let c = new C(); + +assert.sameValue( + c[await 9], + 9 +); +assert.sameValue( + C[await 9], + 9 +); diff --git a/test/language/statements/class/cpn-class-decl-fields-methods-computed-property-name-from-await-expression.js b/test/language/statements/class/cpn-class-decl-fields-methods-computed-property-name-from-await-expression.js new file mode 100644 index 0000000000..d60db2db95 --- /dev/null +++ b/test/language/statements/class/cpn-class-decl-fields-methods-computed-property-name-from-await-expression.js @@ -0,0 +1,57 @@ +// This file was procedurally generated from the following sources: +// - src/computed-property-names/computed-property-name-from-await-expression.case +// - src/computed-property-names/evaluation/class-declaration-fields-methods.template +/*--- +description: Computed property name from condition expression (ComputedPropertyName in ClassExpression) +esid: prod-ComputedPropertyName +features: [computed-property-names, top-level-await] +flags: [generated, module] +info: | + ClassExpression: + classBindingIdentifier opt ClassTail + + ClassTail: + ClassHeritage opt { ClassBody opt } + + ClassBody: + ClassElementList + + ClassElementList: + ClassElement + + ClassElement: + MethodDefinition + + MethodDefinition: + PropertyName ... + get PropertyName ... + set PropertyName ... + + PropertyName: + ComputedPropertyName + + ComputedPropertyName: + [ AssignmentExpression ] +---*/ + + +let C = class { + [await 9] = () => { + return 9; + }; + + static [await 9] = () => { + return 9; + }; +}; + +let c = new C(); + +assert.sameValue( + c[await 9](), + 9 +); +assert.sameValue( + C[await 9](), + 9 +);