summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testModuloWithNegative1.js
blob: ed767a7a2a6427224cae48fd9dc95e910531c31a (plain)
1
2
3
4
5
6
7
8
9
10
11
function testModuloWithNegative1() {
    var v = 0;
    for (var i = 0; i < 2; ++i) {
        c = v;
        v -= 1;
        for (var j = 0; j < 2; ++j)
            c %= -1;
    }
    return 1/c;
}
assertEq(testModuloWithNegative1(), -Infinity);