Debian Codegraph @

js/src/tests/test262/language/statements/continue/S12.7_A9_T2.js

raw
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 info: Continue inside of try-catch nested in a loop is allowed
6 es5id: 12.7_A9_T2
7 description: Using "continue" within catch Block that is within a loop
8 ---*/
9
10 var x=0,y=0;
11
12 (function(){
13 FOR : for(;;){
14 try{
15 x++;
16 if(x===10)return;
17 throw 1;
18 } catch(e){
19 continue;
20 }
21 }
22 })();
23
24 //////////////////////////////////////////////////////////////////////////////
25 //CHECK#1
26 if (x!==10) {
27 throw new Test262Error('#1: Continue inside of try-catch nested in loop is allowed');
28 }
29 //
30 //////////////////////////////////////////////////////////////////////////////
31
32 reportCompare(0, 0);