tor-browser

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

S12.8_A4_T1.js (892B)


      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    When "break Identifier" is evaluated, (break, empty, Identifier) is
      7    returned
      8 es5id: 12.8_A4_T1
      9 description: Using "break Identifier" within labaeled loop
     10 ---*/
     11 
     12 LABEL_OUT : var x=0, y=0;
     13 (function(){
     14 LABEL_DO_LOOP : do {
     15    LABEL_IN : x++;
     16    if(x===10)return;
     17    break LABEL_DO_LOOP;
     18    LABEL_IN_2 : y++;
     19    
     20    function IN_DO_FUNC(){}
     21 } while(0);
     22 
     23 LABEL_ANOTHER_LOOP : do {
     24    ;
     25 } while(0);
     26 
     27 function OUT_FUNC(){}
     28 })();
     29 //////////////////////////////////////////////////////////////////////////////
     30 //CHECK#1
     31 if ((x!==1)&&(y!==0)) {
     32 throw new Test262Error('#1: x === 1 and y === 0. Actual:  x === '+x+' and y ==='+ y  );
     33 }
     34 //
     35 //////////////////////////////////////////////////////////////////////////////
     36 
     37 reportCompare(0, 0);