summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/truthiness/not.js
blob: 58945734a1ebf8366b92175f06f0e3d55bf6b8b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function t1(v)
{
  if (!v)
    return 1;
  return 0;
}

assertEq(t1(createIsHTMLDDA()), 1);
assertEq(t1(createIsHTMLDDA()), 1);
assertEq(t1(createIsHTMLDDA()), 1);

function t2(v)
{
  if (!v)
    return 1;
  return 0;
}

assertEq(t2(17), 0);
assertEq(t2(0), 1);
assertEq(t2(-0), 1);
assertEq(t2(createIsHTMLDDA()), 1);
assertEq(t2(createIsHTMLDDA()), 1);
assertEq(t2(createIsHTMLDDA()), 1);