From 2aa4a82499d4becd2284cdb482213d541b8804dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 16:29:10 +0200 Subject: Adding upstream version 86.0.1. Signed-off-by: Daniel Baumann --- ...-computed-property-name-from-decimal-literal.js | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 js/src/tests/test262/language/expressions/object/cpn-obj-lit-computed-property-name-from-decimal-literal.js (limited to 'js/src/tests/test262/language/expressions/object/cpn-obj-lit-computed-property-name-from-decimal-literal.js') diff --git a/js/src/tests/test262/language/expressions/object/cpn-obj-lit-computed-property-name-from-decimal-literal.js b/js/src/tests/test262/language/expressions/object/cpn-obj-lit-computed-property-name-from-decimal-literal.js new file mode 100644 index 0000000000..27dad519d0 --- /dev/null +++ b/js/src/tests/test262/language/expressions/object/cpn-obj-lit-computed-property-name-from-decimal-literal.js @@ -0,0 +1,40 @@ +// This file was procedurally generated from the following sources: +// - src/computed-property-names/computed-property-name-from-decimal-literal.case +// - src/computed-property-names/evaluation/object-literal.template +/*--- +description: Computed property name from decimal literal (ComputedPropertyName in ObjectLiteral) +esid: prod-ComputedPropertyName +features: [computed-property-names] +flags: [generated] +info: | + ObjectLiteral: + { PropertyDefinitionList } + + PropertyDefinitionList: + PropertyDefinition + + PropertyDefinition: + PropertyName: AssignmentExpression + + PropertyName: + ComputedPropertyName + + ComputedPropertyName: + [ AssignmentExpression ] +---*/ + + +let o = { + [1.1]: 2 +}; + +assert.sameValue( + o[1.1], + 2 +); +assert.sameValue( + o[String(1.1)], + 2 +); + +reportCompare(0, 0); -- cgit v1.2.3