michael@0: function f(v, value) michael@0: { michael@0: var b = v == null; michael@0: assertEq(b, value, michael@0: "failed: " + v + " " + value); michael@0: } michael@0: michael@0: f({}, false); michael@0: f({}, false); michael@0: f(null, true); michael@0: f(null, true); michael@0: f(undefined, true); michael@0: f(undefined, true); michael@0: f(objectEmulatingUndefined(), true); michael@0: f(objectEmulatingUndefined(), true); michael@0: f(Object.prototype, false); michael@0: f(Object.prototype, false); michael@0: michael@0: function g(v, value) michael@0: { michael@0: var b = v == null; michael@0: assertEq(b, value, michael@0: "failed: " + v + " " + value); michael@0: } michael@0: michael@0: g({}, false); michael@0: g({}, false); michael@0: michael@0: function h(v, value) michael@0: { michael@0: var b = v == null; michael@0: assertEq(b, value, michael@0: "failed: " + v + " " + value); michael@0: } michael@0: michael@0: h(objectEmulatingUndefined(), true); michael@0: h(objectEmulatingUndefined(), true);