Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/prop-def-id-valid.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 12.2.5.9
5 description: >
6 When a valid IdentifierReference appears in an object initializer, a new
7 data property is created. The property name is the string value of the
8 identifier, the property value is the value of the identifier, and the
9 property is enumerable, writable, and configurable.
10 includes: [propertyHelper.js]
11 ---*/
12
13 var attr = 23;
14 var obj;
15
16 obj = { attr };
17
18 assert.sameValue(obj.attr, 23);
19 verifyEnumerable(obj, 'attr');
20 verifyWritable(obj, 'attr');
21 verifyConfigurable(obj, 'attr');