summaryrefslogtreecommitdiff
path: root/test/control_flow.post.js
blob: 90349b051624a3d88741e995559007428546cf11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

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');