File: control_flow.post.js

package info (click to toggle)
binaryen 108-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 35,424 kB
  • sloc: cpp: 151,487; javascript: 62,522; ansic: 13,124; python: 5,260; pascal: 441; sh: 75; asm: 27; makefile: 8
file content (26 lines) | stat: -rw-r--r-- 447 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

function test(name) {
  Module.print(name);
  function doTest(x) {
    Module.print('  ' + [x] + ' ==> ' + Module['_check_' + name](x));
  }
  doTest(1);
  doTest(2);
  doTest(3);
  doTest(4);
  doTest(11);
  doTest(90);
}

test('if');
test('loop');
test('loop_break');
test('loop_continue');
test('do_loop');
test('do_once');
test('while_forever');
test('switch');
test('switch_nodefault');
test('switch_rdefault');
test('switch_fallthrough');