15.2.3.6-2-44.js (515B)
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-44 6 description: > 7 Object.defineProperty - argument 'P' is an object that has an own 8 valueOf method 9 ---*/ 10 11 var obj = {}; 12 13 var ownProp = { 14 valueOf: function() { 15 return "abc"; 16 }, 17 toString: undefined 18 }; 19 20 Object.defineProperty(obj, ownProp, {}); 21 22 assert(obj.hasOwnProperty("abc"), 'obj.hasOwnProperty("abc") !== true'); 23 24 reportCompare(0, 0);