Skip to content

Commit

Permalink
Generate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaldron committed Sep 25, 2020
1 parent 9c78f42 commit faf0f67
Show file tree
Hide file tree
Showing 10 changed files with 548 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
);
Original file line number Diff line number Diff line change
@@ -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
);
Original file line number Diff line number Diff line change
@@ -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
);
Original file line number Diff line number Diff line change
@@ -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
);
Original file line number Diff line number Diff line change
@@ -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
);
Original file line number Diff line number Diff line change
@@ -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
);
Original file line number Diff line number Diff line change
@@ -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
);
Loading

0 comments on commit faf0f67

Please sign in to comment.