Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperty/15.2.3.6-4-280.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-280
6 description: >
7 Object.defineProperty - 'O' is an Array, 'name' is generic own
8 data property of 'O', and 'desc' is data descriptor, test updating
9 multiple attribute values of 'name' (15.4.5.1 step 5)
10 includes: [propertyHelper.js]
11 ---*/
12
13
14 var arrObj = [];
15
16 arrObj.property = 12; // default value of attributes: writable: true, configurable: true, enumerable: true
17
18 Object.defineProperty(arrObj, "property", {
19 writable: false,
20 enumerable: false,
21 configurable: false
22 });
23
24 verifyEqualTo(arrObj, "property", 12);
25
26 verifyNotWritable(arrObj, "property");
27
28 verifyNotEnumerable(arrObj, "property");
29
30 verifyNotConfigurable(arrObj, "property");