PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/js/src/jit-test/tests/basic/testDifferingArgc.js

http://github.com/zpao/v8monkey
JavaScript | 18 lines | 18 code | 0 blank | 0 comment | 1 complexity | 57af22219d68c9d82085386200486a2a MD5 | raw file
 1function doTestDifferingArgc(a, b)
 2{
 3    var k = 0;
 4    for (var i = 0; i < 10; i++)
 5    {
 6        k += i;
 7    }
 8    return k;
 9}
10function testDifferingArgc()
11{
12    var x = 0;
13    x += doTestDifferingArgc(1, 2);
14    x += doTestDifferingArgc(1);
15    x += doTestDifferingArgc(1, 2, 3);
16    return x;
17}
18assertEq(testDifferingArgc(), 45*3);