michael@0: function testUndefinedBooleanCmp() michael@0: { michael@0: var t = true, f = false, x = []; michael@0: for (var i = 0; i < 10; ++i) { michael@0: x[0] = t == undefined; michael@0: x[1] = t != undefined; michael@0: x[2] = t === undefined; michael@0: x[3] = t !== undefined; michael@0: x[4] = t < undefined; michael@0: x[5] = t > undefined; michael@0: x[6] = t <= undefined; michael@0: x[7] = t >= undefined; michael@0: x[8] = f == undefined; michael@0: x[9] = f != undefined; michael@0: x[10] = f === undefined; michael@0: x[11] = f !== undefined; michael@0: x[12] = f < undefined; michael@0: x[13] = f > undefined; michael@0: x[14] = f <= undefined; michael@0: x[15] = f >= undefined; michael@0: } michael@0: return x.join(","); michael@0: } michael@0: assertEq(testUndefinedBooleanCmp(), "false,true,false,true,false,false,false,false,false,true,false,true,false,false,false,false");