summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testBitwise.js
blob: 5d940a556bff67ab12b8786d0911e07b023d2ca4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function testBitwise() {
    var x = 10000;
    var y = 123456;
    var z = 987234;
    for (var i = 0; i < 50; i++) {
        x = x ^ y;
        y = y | z;
        z = ~x;
    }
    return x + y + z;
}
assertEq(testBitwise(), -1298);