js/src/jit-test/tests/truthiness/not.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:deca1f8241bc
1 function t1(v)
2 {
3 if (!v)
4 return 1;
5 return 0;
6 }
7
8 assertEq(t1(objectEmulatingUndefined()), 1);
9 assertEq(t1(objectEmulatingUndefined()), 1);
10 assertEq(t1(objectEmulatingUndefined()), 1);
11
12 function t2(v)
13 {
14 if (!v)
15 return 1;
16 return 0;
17 }
18
19 assertEq(t2(17), 0);
20 assertEq(t2(0), 1);
21 assertEq(t2(-0), 1);
22 assertEq(t2(objectEmulatingUndefined()), 1);
23 assertEq(t2(objectEmulatingUndefined()), 1);
24 assertEq(t2(objectEmulatingUndefined()), 1);

mercurial