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: * If Type(x) is different from Type(y), return false michael@0: * michael@0: * @path ch11/11.9/11.9.4/S11.9.4_A8_T2.js michael@0: * @description x or y is primitive number michael@0: */ michael@0: michael@0: //CHECK#1 michael@0: if (1 === new Number(1)) { michael@0: $ERROR('#1: 1 !== new Number(1)'); michael@0: } michael@0: michael@0: //CHECK#2 michael@0: if (1 === true) { michael@0: $ERROR('#2: 1 !== true'); michael@0: } michael@0: michael@0: //CHECK#3 michael@0: if (1 === new Boolean(1)) { michael@0: $ERROR('#3: 1 !== new Boolean(1)'); michael@0: } michael@0: michael@0: //CHECK#4 michael@0: if (1 === "1") { michael@0: $ERROR('#4: 1 !== "1"'); michael@0: } michael@0: michael@0: //CHECK#5 michael@0: if (1 === new String(1)) { michael@0: $ERROR('#5: 1 !== new String(1)'); michael@0: } michael@0: michael@0: //CHECK#6 michael@0: if (new Number(0) === 0) { michael@0: $ERROR('#6: new Number(0) !== 0'); michael@0: } michael@0: michael@0: //CHECK#7 michael@0: if (false === 0) { michael@0: $ERROR('#7: false !== 0'); michael@0: } michael@0: michael@0: //CHECK#8 michael@0: if (new Boolean(0) === 0) { michael@0: $ERROR('#8: new Boolean(0) !== 0'); michael@0: } michael@0: michael@0: //CHECK#9 michael@0: if ("0" === 0) { michael@0: $ERROR('#9: "0" !== 0'); michael@0: } michael@0: michael@0: //CHECK#10 michael@0: if (new String(0) === 0) { michael@0: $ERROR('#10: new String(0) !== 0'); michael@0: } michael@0: michael@0: //CHECK#11 michael@0: if (1 === {valueOf: function () {return 1}}) { michael@0: $ERROR('#11: 1 === {valueOf: function () {return 1}}'); michael@0: } michael@0: