Debian Codegraph @

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