Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperties/15.2.3.7-6-a-232.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.7-6-a-232
6 description: >
7 Object.defineProperties - 'O' is an Array, 'P' is an array index
8 property, 'P' is accessor property and 'desc' is data descriptor,
9 and the [[Configurable]] attribute value of 'P' is true, test 'P'
10 is converted from accessor property to data property (15.4.5.1
11 step 4.c)
12 includes: [propertyHelper.js]
13 ---*/
14
15 var arr = [];
16
17 Object.defineProperty(arr, "1", {
18 get: function() {
19 return 3;
20 },
21 configurable: true
22
23 });
24
25 Object.defineProperties(arr, {
26 "1": {
27 value: 12
28 }
29 });
30
31 verifyEqualTo(arr, "1", 12);
32
33 verifyNotWritable(arr, "1");
34
35 verifyNotEnumerable(arr, "1");
36
37 verifyConfigurable(arr, "1");