summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/warp/bug1769410.js
blob: 9d66d96e39497e081bc33153cde06c1525a8ca5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// |jit-test| --fast-warmup
function f(x) {
    var a = Math.fround(Math.fround(false));
    var b = Math.min(a, x ? Math.fround(x) : Math.fround(x));
    return b >>> 0;
}
function test() {
    with (this) {} // Don't inline.
    for (var i = 0; i < 100; i++) {
        assertEq(f(Infinity), 0);
    }
    assertEq(f(-1), 4294967295);
}
test();