mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 16:34:27 +02:00
Coverage: computed property names from yield expression
# Conflicts: # src/computed-property-names/evaluation/yield-expression.template
This commit is contained in:
parent
677ae94ae9
commit
d65346149e
@ -2,11 +2,16 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// 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
|
template: evaluation
|
||||||
features: [computed-property-names]
|
features: [computed-property-names]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
//- setup
|
||||||
|
function * g() {
|
||||||
//- ComputedPropertyName
|
//- ComputedPropertyName
|
||||||
true ? 1 : 2
|
yield 9
|
||||||
//- value
|
//- value
|
||||||
2
|
9
|
||||||
|
//- teardown
|
||||||
|
}
|
||||||
|
@ -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}*/
|
|
||||||
);
|
|
Loading…
x
Reference in New Issue
Block a user