michael@0: // Copyright 2009 the Sputnik authors. All rights reserved. michael@0: // This code is governed by the BSD license found in the LICENSE file. michael@0: michael@0: /** michael@0: * Only Function objects implement [[HasInstance]] and can be proper ShiftExpression for the "instanceof" operator consequently michael@0: * michael@0: * @path ch11/11.8/11.8.6/S11.8.6_A6_T3.js michael@0: * @description Checking if RelationalExpression is function michael@0: */ michael@0: michael@0: function MyFunct(){return 0}; michael@0: michael@0: //CHECK#1 michael@0: if (MyFunct instanceof MyFunct){ michael@0: $ERROR('#1 function MyFunct(){return 0}; MyFunct instanceof MyFunct === false'); michael@0: } michael@0: michael@0: //CHECK#2 michael@0: if (MyFunct instanceof Function !== true){ michael@0: $ERROR('#2 function MyFunct(){return 0}; MyFunct instanceof Function === true'); michael@0: } michael@0: michael@0: //CHECK#3 michael@0: if (MyFunct instanceof Object !== true){ michael@0: $ERROR('#3 function MyFunct(){return 0}; MyFunct instanceof Object === true'); michael@0: } michael@0: