]>
Commit | Line | Data |
---|---|---|
ed1e77d3 A |
1 | //@ runProfiler |
2 | function test() { | |
3 | (function functionName() { | |
4 | ++counter; | |
5 | if (!arguments[0]) | |
6 | return; | |
7 | eval("functionName(arguments[0] - 1, functionName, '' + functionName);"); | |
8 | })(arguments[0]); | |
9 | } | |
10 | ||
11 | for (var i = 0; i < 10000; ++i) { | |
12 | counter = 0; | |
13 | test(100); | |
14 | if (counter !== 101) { | |
15 | throw "Oops, test(100) = " + test(100) + ", expected 101."; | |
16 | } | |
17 | } |