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: * MemberExpression calls ToObject(MemberExpression) and ToString(Expression). CallExpression calls ToObject(CallExpression) and ToString(Expression) michael@0: * michael@0: * @path ch11/11.2/11.2.1/S11.2.1_A3_T1.js michael@0: * @description Checking Boolean case michael@0: */ michael@0: michael@0: //CHECK#1 michael@0: if (true.toString() !== "true") { michael@0: $ERROR('#1: true.toString() === "true". Actual: ' + (true.toString())); michael@0: } michael@0: michael@0: //CHECK#2 michael@0: if (false["toString"]() !== "false") { michael@0: $ERROR('#2: false["toString"]() === "false". Actual: ' + (false["toString"]())); michael@0: } michael@0: michael@0: //CHECK#3 michael@0: if (new Boolean(true).toString() !== "true") { michael@0: $ERROR('#3: new Boolean(true).toString() === "true". Actual: ' + (new Boolean(true).toString())); michael@0: } michael@0: michael@0: //CHECK#4 michael@0: if (new Boolean(false)["toString"]() !== "false") { michael@0: $ERROR('#4: new Boolean(false)["toString"]() === "false". Actual: ' + (new Boolean(false)["toString"]())); michael@0: } michael@0: