summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testBug504520.js
blob: ba5f767640d46e5533e26ecb6224e4ecee19ddaa (plain)
1
2
3
4
5
6
7
8
9
10
11
function testBug504520() {
    // A bug involving comparisons.
    var arr = [1/0, 1/0, 1/0, 1/0, 1/0, 1/0, 1/0, 1/0, 1/0, 0];
    assertEq(arr.length > 9, true);

    var s = '';
    for (var i = 0; i < arr.length; i++)
        arr[i] >= 1/0 ? null : (s += i);
    assertEq(s, '9');
}
testBug504520();