Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperty/15.2.3.6-4-411.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-411
6 description: >
7 ES5 Attributes - Inherited property whose [[Enumerable]] attribute
8 is set to false is non-enumerable (Math)
9 ---*/
10
11 Object.defineProperty(Object.prototype, "prop", {
12 value: 1001,
13 writable: false,
14 enumerable: false,
15 configurable: true
16 });
17
18 var verifyEnumerable = false;
19 for (var p in Math) {
20 if (p === "prop") {
21 verifyEnumerable = true;
22 }
23 }
24
25 assert.sameValue(Math.hasOwnProperty("prop"), false, 'Math.hasOwnProperty("prop")');
26 assert.sameValue(verifyEnumerable, false, 'verifyEnumerable');