js/src/jit-test/tests/truthiness/strict-not-equal-null.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:3c755969fc5f
1 function f(v, value)
2 {
3 var b = v !== null;
4 assertEq(b, value,
5 "failed: " + v + " " + value);
6 }
7
8 f({}, true);
9 f({}, true);
10 f(null, false);
11 f(null, false);
12 f(undefined, true);
13 f(undefined, true);
14 f(objectEmulatingUndefined(), true);
15 f(objectEmulatingUndefined(), true);
16 f(Object.prototype, true);
17 f(Object.prototype, true);
18
19 function g(v, value)
20 {
21 var b = v !== null;
22 assertEq(b, value,
23 "failed: " + v + " " + value);
24 }
25
26 g({}, true);
27 g({}, true);
28
29 function h(v, value)
30 {
31 var b = v !== null;
32 assertEq(b, value,
33 "failed: " + v + " " + value);
34 }
35
36 h(objectEmulatingUndefined(), true);
37 h(objectEmulatingUndefined(), true);

mercurial