Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperties/15.2.3.7-6-a-269.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-269
6 description: >
7 Object.defineProperties - 'O' is an Array, 'P' is generic own data
8 property of 'O', and 'desc' is data descriptor, test updating
9 multiple attribute values of 'P' (15.4.5.1 step 5)
10 includes: [propertyHelper.js]
11 ---*/
12
13
14 var arr = [];
15 arr.property = 12; // default value of attributes: writable: true, configurable: true, enumerable: true
16
17 Object.defineProperties(arr, {
18 "property": {
19 writable: false,
20 enumerable: false,
21 configurable: false
22 }
23 });
24 verifyEqualTo(arr, "property", 12);
25
26 verifyNotWritable(arr, "property");
27
28 verifyNotEnumerable(arr, "property");
29
30 verifyNotConfigurable(arr, "property");
31
32 if (arr.length !== 0) {
33 $ERROR('Expected arr.length === 0, actually ' + arr.length);
34 }