Debian Codegraph @

js/src/tests/test262/built-ins/Object/defineProperties/15.2.3.7-6-a-54.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-54
6 description: >
7 Object.defineProperties - desc.value and P.value are two Ojbects
8 which refer to the different objects (8.12.9 step 6)
9 includes: [propertyHelper.js]
10 ---*/
11
12
13 var obj = {};
14
15 var obj1 = {
16 length: 10
17 };
18 obj.foo = obj1; // default value of attributes: writable: true, configurable: true, enumerable: true
19
20 var obj2 = {
21 length: 20
22 };
23
24 Object.defineProperties(obj, {
25 foo: {
26 value: obj2
27 }
28 });
29
30 verifyProperty(obj, "foo", {
31 value: obj2,
32 writable: true,
33 enumerable: true,
34 configurable: true,
35 });
36
37 reportCompare(0, 0);