Debian Codegraph @

js/src/tests/test262/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
31 verifyProperty(obj, "foo", {
32 value: 12,
33 writable: false,
34 enumerable: false,
35 configurable: true,
36 });
37
38 reportCompare(0, 0);