tor-browser

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

S7.9_A2.js (751B)


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