Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperties/15.2.3.7-2-15.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-2-15
6 description: Object.defineProperties - argument 'Properties' is an Error object
7 ---*/
8
9 var obj = {};
10 var props = new Error("test");
11 var obj1 = {
12 value: 11
13 };
14 props.description = obj1;
15 props.message = obj1;
16 props.name = obj1;
17
18 var result = false;
19
20 Object.defineProperty(props, "prop", {
21 get: function() {
22 result = this instanceof Error;
23 return {};
24 },
25 enumerable: true
26 });
27
28 Object.defineProperties(obj, props);
29
30 assert(result, 'result !== true');