Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperty/15.2.3.6-2-43.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-2-43
6 description: >
7 Object.defineProperty - argument 'P' is an object that has an own
8 toString method
9 ---*/
10
11 var obj = {};
12
13 var ownProp = {
14 toString: function() {
15 return "abc";
16 }
17 };
18
19 Object.defineProperty(obj, ownProp, {});
20
21 assert(obj.hasOwnProperty("abc"), 'obj.hasOwnProperty("abc") !== true');