summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testCaseAbort.js
blob: 4e594bb86e385c01cb1b7d96772df0a4aada294a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function testCaseAbort()
{
  var four = "4";
  var r = 0;
  for (var i = 0; i < 5; i++)
  {
    switch (i)
    {
      case four: r += 1; break;
      default: r += 2; break;
    }
  }

  return "" + r;
}
assertEq(testCaseAbort(), "10");