Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperties/15.2.3.7-6-a-57.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-57
6 description: >
7 Object.defineProperties - both desc.[[Get]] and P.[[Get]] are two
8 objects which refer to the same object (8.12.9 step 6)
9 includes: [propertyHelper.js]
10 ---*/
11
12
13 var obj = {};
14
15 function get_Func() {
16 return 10;
17 }
18
19 Object.defineProperty(obj, "foo", {
20 get: get_Func
21 });
22
23 Object.defineProperties(obj, {
24 foo: {
25 get: get_Func
26 }
27 });
28
29 verifyNotEnumerable(obj, "foo");
30 assert.sameValue(obj.foo, 10);
31
32 verifyNotConfigurable(obj, "foo")