Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/create/15.2.3.5-4-37.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.5-4-37
6 description: >
7 Object.create - 'Properties' is an Error object that uses Object's
8 [[Get]] method to access own enumerable property (15.2.3.7 step
9 5.a)
10 ---*/
11
12 var props = new Error("test");
13
14 (Object.getOwnPropertyNames(props)).forEach(function(name) {
15 props[name] = {
16 value: 11,
17 configurable: true
18 }
19 });
20
21 props.prop15_2_3_5_4_37 = {
22 value: 12,
23 enumerable: true
24 };
25 var newObj = Object.create({}, props);
26
27 assert(newObj.hasOwnProperty("prop15_2_3_5_4_37"), 'newObj.hasOwnProperty("prop15_2_3_5_4_37") !== true');