summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/warp/min-max-foldsTo-4.js
blob: aa7e09ba226236ab75760c486d399155fae81bb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
with ({}); // Don't inline anything into the top-level script.

function f(x) {
  return Math.min(Math.max(x / x, x), x);
}

for (var i = 0; i < 100; ++i) {
  f(1);
}

assertEq(f(0), NaN);