tor-browser

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

S12.6.2_A9.js (782B)


      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: "\"while\" Statement is evaluated without syntax checks"
      6 es5id: 12.6.2_A9
      7 description: Throwing system exception inside "while" loop
      8 ---*/
      9 
     10 //////////////////////////////////////////////////////////////////////////////
     11 //CHECK#1
     12 try {
     13 while(x!=1) {
     14     var x = 1; 
     15     abaracadabara;
     16 };
     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: while statement evaluates as is, without syntax checks');
     25 }
     26 //
     27 //////////////////////////////////////////////////////////////////////////////
     28 
     29 reportCompare(0, 0);