Coverage: computed property names from yield expression

# Conflicts:
#	src/computed-property-names/evaluation/yield-expression.template
This commit is contained in:
Rick Waldron 2020-09-25 13:31:54 -04:00
parent 677ae94ae9
commit d65346149e
2 changed files with 8 additions and 39 deletions

View File

@ -2,11 +2,16 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Computed property name from condition expression
desc: Computed property name from yield expression
template: evaluation
features: [computed-property-names]
---*/
//- setup
function * g() {
//- ComputedPropertyName
true ? 1 : 2
yield 9
//- value
2
9
//- teardown
}

View File

@ -1,36 +0,0 @@
// Copyright (C) 2020 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/object/cpn-yield-expr-
name: ComputedPropertyName in ObjectLiteral
esid: prod-ComputedPropertyName
info: |
ObjectLiteral:
{ PropertyDefinitionList }
PropertyDefinitionList:
PropertyDefinition
PropertyDefinition:
PropertyName: AssignmentExpression
PropertyName:
ComputedPropertyName
ComputedPropertyName:
[ AssignmentExpression ]
---*/
let o = {
[/*{ComputedPropertyName}*/]: /*{value}*/
};
assert.sameValue(
o[/*{ComputedPropertyName}*/],
/*{value}*/
);
assert.sameValue(
o[String(/*{ComputedPropertyName}*/)],
/*{value}*/
);