Generate tests

This commit is contained in:
Rick Waldron 2020-09-25 13:40:56 -04:00
parent 4853f6d363
commit 21e97fb616
10 changed files with 160 additions and 10 deletions

View File

@ -5,7 +5,7 @@
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
esid: prod-ComputedPropertyName
features: [computed-property-names, top-level-await]
flags: [generated, module]
flags: [generated, async, module]
info: |
ClassExpression:
classBindingIdentifier opt ClassTail
@ -33,6 +33,7 @@ info: |
ComputedPropertyName:
[ AssignmentExpression ]
---*/
try {
let C = class {
@ -72,3 +73,25 @@ assert.sameValue(
C[await 9] = 9,
9
);
assert.sameValue(
c[String(await 9)],
9
);
assert.sameValue(
c[String(await 9)] = 9,
9
);
assert.sameValue(
C[String(await 9)],
9
);
assert.sameValue(
C[String(await 9)] = 9,
9
);
} catch (e) {
$DONE(e);
}
$DONE();

View File

@ -5,7 +5,7 @@
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
esid: prod-ComputedPropertyName
features: [computed-property-names, top-level-await]
flags: [generated, module]
flags: [generated, async, module]
info: |
ClassExpression:
classBindingIdentifier opt ClassTail
@ -33,6 +33,7 @@ info: |
ComputedPropertyName:
[ AssignmentExpression ]
---*/
try {
let C = class {
@ -54,3 +55,16 @@ assert.sameValue(
C[await 9](),
9
);
assert.sameValue(
c[String(await 9)](),
9
);
assert.sameValue(
C[String(await 9)](),
9
);
} catch (e) {
$DONE(e);
}
$DONE();

View File

@ -5,7 +5,7 @@
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
esid: prod-ComputedPropertyName
features: [computed-property-names, top-level-await]
flags: [generated, module]
flags: [generated, async, module]
info: |
ClassExpression:
classBindingIdentifier opt ClassTail
@ -33,6 +33,7 @@ info: |
ComputedPropertyName:
[ AssignmentExpression ]
---*/
try {
let C = class {
@ -51,3 +52,16 @@ assert.sameValue(
C[await 9],
9
);
assert.sameValue(
c[String(await 9)],
9
);
assert.sameValue(
C[String(await 9)],
9
);
} catch (e) {
$DONE(e);
}
$DONE();

View File

@ -5,7 +5,7 @@
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
esid: prod-ComputedPropertyName
features: [computed-property-names, top-level-await]
flags: [generated, module]
flags: [generated, async, module]
info: |
ClassExpression:
classBindingIdentifier opt ClassTail
@ -33,6 +33,7 @@ info: |
ComputedPropertyName:
[ AssignmentExpression ]
---*/
try {
let C = class {
@ -55,3 +56,16 @@ assert.sameValue(
C[await 9](),
9
);
assert.sameValue(
c[String(await 9)](),
9
);
assert.sameValue(
C[String(await 9)](),
9
);
} catch (e) {
$DONE(e);
}
$DONE();

View File

@ -5,7 +5,7 @@
description: Computed property name from condition expression (ComputedPropertyName in ObjectLiteral)
esid: prod-ComputedPropertyName
features: [computed-property-names, top-level-await]
flags: [generated, module]
flags: [generated, async, module]
info: |
ObjectLiteral:
{ PropertyDefinitionList }
@ -22,6 +22,7 @@ info: |
ComputedPropertyName:
[ AssignmentExpression ]
---*/
try {
let o = {
@ -32,3 +33,12 @@ assert.sameValue(
o[await 9],
9
);
assert.sameValue(
o[String(await 9)],
9
);
} catch (e) {
$DONE(e);
}
$DONE();

View File

@ -5,7 +5,7 @@
description: Computed property name from condition expression (ComputedPropertyName in ObjectLiteral)
esid: prod-ComputedPropertyName
features: [computed-property-names, top-level-await]
flags: [generated, module]
flags: [generated, async, module]
info: |
ObjectLiteral:
{ PropertyDefinitionList }
@ -22,6 +22,7 @@ info: |
ComputedPropertyName:
[ AssignmentExpression ]
---*/
try {
let o = {
@ -32,3 +33,12 @@ assert.sameValue(
o[await 9],
9
);
assert.sameValue(
o[String(await 9)],
9
);
} catch (e) {
$DONE(e);
}
$DONE();

View File

@ -5,7 +5,7 @@
description: Computed property name from condition expression (ComputedPropertyName in ClassDeclaration)
esid: prod-ComputedPropertyName
features: [computed-property-names, top-level-await]
flags: [generated, module]
flags: [generated, async, module]
info: |
ClassExpression:
classBindingIdentifier opt ClassTail
@ -33,6 +33,7 @@ info: |
ComputedPropertyName:
[ AssignmentExpression ]
---*/
try {
class C {
@ -72,3 +73,25 @@ assert.sameValue(
C[await 9] = 9,
9
);
assert.sameValue(
c[String(await 9)],
9
);
assert.sameValue(
c[String(await 9)] = 9,
9
);
assert.sameValue(
C[String(await 9)],
9
);
assert.sameValue(
C[String(await 9)] = 9,
9
);
} catch (e) {
$DONE(e);
}
$DONE();

View File

@ -5,7 +5,7 @@
description: Computed property name from condition expression (ComputedPropertyName in ClassDeclaration)
esid: prod-ComputedPropertyName
features: [computed-property-names, top-level-await]
flags: [generated, module]
flags: [generated, async, module]
info: |
ClassExpression:
classBindingIdentifier opt ClassTail
@ -33,6 +33,7 @@ info: |
ComputedPropertyName:
[ AssignmentExpression ]
---*/
try {
class C {
@ -54,3 +55,16 @@ assert.sameValue(
C[await 9](),
9
);
assert.sameValue(
c[String(await 9)](),
9
);
assert.sameValue(
C[String(await 9)](),
9
);
} catch (e) {
$DONE(e);
}
$DONE();

View File

@ -5,7 +5,7 @@
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
esid: prod-ComputedPropertyName
features: [computed-property-names, top-level-await]
flags: [generated, module]
flags: [generated, async, module]
info: |
ClassExpression:
classBindingIdentifier opt ClassTail
@ -33,6 +33,7 @@ info: |
ComputedPropertyName:
[ AssignmentExpression ]
---*/
try {
let C = class {
@ -51,3 +52,16 @@ assert.sameValue(
C[await 9],
9
);
assert.sameValue(
c[String(await 9)],
9
);
assert.sameValue(
C[String(await 9)],
9
);
} catch (e) {
$DONE(e);
}
$DONE();

View File

@ -5,7 +5,7 @@
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
esid: prod-ComputedPropertyName
features: [computed-property-names, top-level-await]
flags: [generated, module]
flags: [generated, async, module]
info: |
ClassExpression:
classBindingIdentifier opt ClassTail
@ -33,6 +33,7 @@ info: |
ComputedPropertyName:
[ AssignmentExpression ]
---*/
try {
let C = class {
@ -55,3 +56,16 @@ assert.sameValue(
C[await 9](),
9
);
assert.sameValue(
c[String(await 9)](),
9
);
assert.sameValue(
C[String(await 9)](),
9
);
} catch (e) {
$DONE(e);
}
$DONE();