tor-browser

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

S12.6.2_A4_T2.js (1052B)


      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    "break" within a "while" Statement is allowed and performed as described
      7    in 12.8
      8 es5id: 12.6.2_A4_T2
      9 description: "\"break\" and VariableDeclaration within a \"while\" Statement"
     10 ---*/
     11 
     12 do_out : while(1===1) {
     13    if (__in__do__before__break) break;
     14    var __in__do__before__break="black";
     15    do_in : while (1) {
     16        var __in__do__IN__before__break="hole";
     17        break do_in; 
     18        var __in__do__IN__after__break="sun";
     19    } ;
     20    var __in__do__after__break="won't you come";
     21 };
     22 
     23 //////////////////////////////////////////////////////////////////////////////
     24 //CHECK#1
     25 if (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)) {
     26 throw new Test262Error('#1: Break inside do-while is allowed as its described at standard');
     27 }
     28 //
     29 //////////////////////////////////////////////////////////////////////////////
     30 
     31 reportCompare(0, 0);