Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperties/15.2.3.7-6-a-30.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-30
6 description: >
7 Object.defineProperties - 'P' doesn't exist in 'O', test
8 [[Configurable]] of 'P' is set as false value if absent in data
9 descriptor 'desc' (8.12.9 step 4.a.i)
10 includes: [propertyHelper.js]
11 ---*/
12
13 var obj = {};
14
15
16 Object.defineProperties(obj, {
17 prop: {
18 value: 1001
19 }
20 });
21
22 verifyNotConfigurable(obj, "prop");
23
24 if (!obj.hasOwnProperty("prop")) {
25 $ERROR('Expected obj.hasOwnProperty("prop") to be true, actually ' + obj.hasOwnProperty("prop"));
26 }
27
28 if (obj.prop !== 1001) {
29 $ERROR('Expected obj.prop === 1001, actually ' + obj.prop);
30 }