tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

S7.9_A1.js (859B)


      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: Check Continue Statement for automatic semicolon insertion
      6 es5id: 7.9_A1
      7 description: Try use continue \n Label construction
      8 ---*/
      9 
     10 //CHECK#1
     11 label1: for (var i = 0; i <= 0; i++) {
     12  for (var j = 0; j <= 1; j++) {
     13    if (j === 0) {
     14      continue label1;
     15    } else {
     16      throw new Test262Error('#1: Check continue statement for automatic semicolon insertion');
     17    }
     18  }
     19 }
     20 
     21 //CHECK#2
     22 var result = false;
     23 label2: for (var i = 0; i <= 1; i++) {
     24  for (var j = 0; j <= 1; j++) {
     25    if (j === 0) {
     26      continue
     27      label2;
     28    } else {
     29      result = true;
     30    }
     31  }
     32 }
     33 
     34 if (result !== true) {
     35  throw new Test262Error('#2: Check continue statement for automatic semicolon insertion');
     36 }
     37 
     38 reportCompare(0, 0);