tor-browser

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

S12.6.1_A9.js (765B)


      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: "\"do-while\" Statement is evaluated without syntax checks"
      6 es5id: 12.6.1_A9
      7 description: Throwing system exception whithin a "do-while" loop
      8 ---*/
      9 
     10 //////////////////////////////////////////////////////////////////////////////
     11 //CHECK#1
     12 try {
     13 do {
     14     var x = 1; 
     15     abaracadabara;
     16 } while(0);
     17 throw new Test262Error('#1: "abbracadabra" lead to throwing exception');
     18 
     19 } catch (e) {
     20    if (e instanceof Test262Error) throw e;
     21 }
     22 
     23 if (x !== 1) {
     24 throw new Test262Error('#1.1: x === 1. Actual:  x ==='+ x  );
     25 }
     26 //
     27 //////////////////////////////////////////////////////////////////////////////
     28 
     29 reportCompare(0, 0);