Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperty/15.2.3.6-4-212.js

raw
1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 es5id: 15.2.3.6-4-212
6 description: >
7 Object.defineProperty - 'O' is an Array, 'name' is an array index
8 named property, 'name' makes no change if the value of every field
9 in 'desc' is the same value as the corresponding field in
10 'name'(desc is data property) (15.4.5.1 step 4.c)
11 includes: [propertyHelper.js]
12 ---*/
13
14 var arrObj = [];
15
16 arrObj[0] = 100; // default value of attributes: writable: true, configurable: true, enumerable: true
17
18 Object.defineProperty(arrObj, "0", {
19 value: 100,
20 writable: true,
21 enumerable: true,
22 configurable: true
23 });
24
25 verifyEqualTo(arrObj, "0", 100);
26
27 verifyWritable(arrObj, "0");
28
29 verifyEnumerable(arrObj, "0");
30
31 verifyConfigurable(arrObj, "0");