Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperties/15.2.3.7-6-a-100.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-100
6 description: >
7 Object.defineProperties - 'P' is data property, several attributes
8 values of P and properties are different (8.12.9 step 12)
9 includes: [propertyHelper.js]
10 ---*/
11
12
13 var obj = {};
14
15 Object.defineProperty(obj, "foo", {
16 value: 100,
17 writable: true,
18 configurable: true
19 });
20
21 Object.defineProperties(obj, {
22 foo: {
23 value: 200,
24 writable: false,
25 configurable: false
26 }
27 });
28 verifyEqualTo(obj, "foo", 200);
29
30 verifyNotWritable(obj, "foo");
31
32 verifyNotEnumerable(obj, "foo");
33
34 verifyNotConfigurable(obj, "foo");