Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperties/15.2.3.7-6-a-70.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-70
6 description: >
7 Object.defineProperties - 'P' is accessor property and
8 P.configurable is true, 'desc' in 'Properties' is data property
9 (8.12.9 step 9.c.i)
10 includes: [propertyHelper.js]
11 ---*/
12
13
14 var obj = {};
15
16 function get_func() {
17 return 10;
18 }
19
20 Object.defineProperty(obj, "foo", {
21 get: get_func,
22 configurable: true
23 });
24
25 Object.defineProperties(obj, {
26 foo: {
27 value: 12
28 }
29 });
30 verifyEqualTo(obj, "foo", 12);
31
32 verifyNotWritable(obj, "foo");
33
34 verifyNotEnumerable(obj, "foo");
35
36 verifyConfigurable(obj, "foo");