Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperty/15.2.3.6-4-88.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.6-4-88
6 description: >
7 Object.defineProperty will not throw TypeError when
8 name.configurable = false, name.writable = false, desc.value and
9 name.value are two numbers with the same value (8.12.9 step
10 10.a.ii.1)
11 includes: [propertyHelper.js]
12 ---*/
13
14
15 var obj = {};
16
17 Object.defineProperty(obj, "foo", {
18 value: 100,
19 writable: false,
20 configurable: false
21 });
22
23 Object.defineProperty(obj, "foo", {
24 value: 100
25 });
26 verifyEqualTo(obj, "foo", 100);
27
28 verifyNotWritable(obj, "foo");
29
30 verifyNotEnumerable(obj, "foo");
31
32 verifyNotConfigurable(obj, "foo");