summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testDifferingArgc.js
blob: 0cac5696fca7137257ad653c920fd4fea4eac49a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function doTestDifferingArgc(a, b)
{
    var k = 0;
    for (var i = 0; i < 10; i++)
    {
        k += i;
    }
    return k;
}
function testDifferingArgc()
{
    var x = 0;
    x += doTestDifferingArgc(1, 2);
    x += doTestDifferingArgc(1);
    x += doTestDifferingArgc(1, 2, 3);
    return x;
}
assertEq(testDifferingArgc(), 45*3);