S12.6.3_A11_T2.js (1861B)
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: | 6 If (Evaluate Statement).type is "continue" and (Evaluate 7 Statement).target is in the current label set, iteration of labeled loop 8 breaks 9 es5id: 12.6.3_A11_T2 10 description: Embedded loops 11 ---*/ 12 13 var __str, index, index_n; 14 __str=""; 15 16 outer : for(index=0; index<4; index+=1) { 17 nested : for(index_n=0; index_n<=index; index_n++) { 18 if (index*index_n == 6)continue nested; 19 __str+=""+index+index_n; 20 } 21 } 22 23 ////////////////////////////////////////////////////////////////////////////// 24 //CHECK#1 25 if (__str !== "001011202122303133") { 26 throw new Test262Error('#1: __str === "001011202122303133". Actual: __str ==='+ __str ); 27 } 28 // 29 ////////////////////////////////////////////////////////////////////////////// 30 31 __str=""; 32 33 outer : for(index=0; index<4; index+=1) { 34 nested : for(index_n=0; index_n<=index; index_n++) { 35 if (index*index_n == 6)continue outer; 36 __str+=""+index+index_n; 37 } 38 } 39 ////////////////////////////////////////////////////////////////////////////// 40 //CHECK#2 41 if (__str !== "0010112021223031") { 42 throw new Test262Error('#2: __str === "0010112021223031". Actual: __str ==='+ __str ); 43 } 44 // 45 ////////////////////////////////////////////////////////////////////////////// 46 47 __str=""; 48 49 outer : for(index=0; index<4; index+=1) { 50 nested : for(index_n=0; index_n<=index; index_n++) { 51 if (index*index_n == 6)continue ; 52 __str+=""+index+index_n; 53 } 54 } 55 56 ////////////////////////////////////////////////////////////////////////////// 57 //CHECK#3 58 if (__str !== "001011202122303133") { 59 throw new Test262Error('#3: __str === "001011202122303133". Actual: __str ==='+ __str ); 60 } 61 // 62 ////////////////////////////////////////////////////////////////////////////// 63 64 reportCompare(0, 0);