summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/notV.js
blob: 422024d00ecd14ac758db4251045863f7e9af60e (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
25
26
27
28
29
30
31
32
function foo(x) {
   return !x;
}

assertEq(foo({}), false);
assertEq(foo({}), false);
assertEq(foo(1.1), false);
assertEq(foo(1.1), false);
assertEq(foo(0.0), true);
assertEq(foo(0.0), true);
assertEq(foo(null), true);
assertEq(foo(null), true);
assertEq(foo(undefined), true);
assertEq(foo(undefined), true);
assertEq(foo(Infinity), false);
assertEq(foo(Infinity), false);
assertEq(foo(NaN), true);
assertEq(foo(NaN), true);
assertEq(foo([]), false);
assertEq(foo([]), false);
assertEq(foo(''), true);
assertEq(foo(''), true);
assertEq(foo('x'), false);
assertEq(foo('x'), false);
assertEq(foo(true), false);
assertEq(foo(true), false);
assertEq(foo(false), true);
assertEq(foo(false), true);
assertEq(foo(-0.0), true);
assertEq(foo(-0.0), true);
assertEq(foo(objectEmulatingUndefined()), true);
assertEq(foo(objectEmulatingUndefined()), true);