tor-browser

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

S12.6.1_A4_T1.js (1244B)


      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 "do-while" Statement is allowed and performed as
      7    described in 12.8
      8 es5id: 12.6.1_A4_T1
      9 description: Using "break" within a "do-while" loop
     10 ---*/
     11 
     12 var __in__do__before__break, __in__do__after__break;
     13 
     14 do {
     15    __in__do__before__break="reached"; 
     16    break; 
     17    __in__do__after__break="where am i";
     18 } while(2===1);
     19 
     20 //////////////////////////////////////////////////////////////////////////////
     21 //CHECK#1
     22 if (__in__do__before__break !== "reached") {
     23 throw new Test262Error('#1: __in__do__before__break === "reached". Actual:  __in__do__before__break ==='+ __in__do__before__break  );
     24 }
     25 //
     26 //////////////////////////////////////////////////////////////////////////////
     27 
     28 //////////////////////////////////////////////////////////////////////////////
     29 //CHECK#2
     30 if (typeof __in__do__after__break !== "undefined") {
     31 throw new Test262Error('#2: typeof __in__do__after__break === "undefined". Actual:  typeof __in__do__after__break ==='+ typeof __in__do__after__break  );
     32 }
     33 //
     34 //////////////////////////////////////////////////////////////////////////////
     35 
     36 reportCompare(0, 0);