summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/warp/bug1687661.js
blob: e1b90a18796e04610374c952fff538bdcffcbe9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function f(x,y) {
    return Math.trunc(+(y ? x : y) || ~y);
}

with ({}) {}

for (var i = 0; i < 10; i++) {
    f(0,1);
    f(NaN,1);
    f(0.1,0);
}

assertEq(f(0.1, 1), 0);