]>
Commit | Line | Data |
---|---|---|
abe05a73 XL |
1 | |
2 | function test(name) { | |
3 | Module.print(name); | |
4 | function doTest(x) { | |
5 | Module.print(' ' + [x] + ' ==> ' + Module['_' + name](x)); | |
6 | } | |
7 | doTest(1); | |
8 | doTest(2); | |
9 | doTest(3); | |
10 | doTest(4); | |
11 | doTest(7); | |
12 | } | |
13 | ||
14 | test('simple'); | |
15 | test('fibo'); | |
16 | ||
17 | Module.print('run_script'); | |
18 | Module.print(Module['_run_script']()); | |
19 | ||
20 | Module.print('too many/few arguments'); | |
21 | Module.print(Module['_simple']()); | |
22 | Module.print(Module['_simple'](10, 20)); | |
23 |