tor-browser

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

S12.6.1_A14_T2.js (890B)


      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: FunctionExpression within a "do-while" Expression is allowed
      6 es5id: 12.6.1_A14_T2
      7 description: >
      8    Using FunctionExpression "function __func(){return 0;}()" as an
      9    Expression
     10 ---*/
     11 
     12 //////////////////////////////////////////////////////////////////////////////
     13 //CHECK#
     14 do{
     15    var __reached = 1;
     16   break;
     17 }while(function __func(){return 0;}());
     18 //
     19 //////////////////////////////////////////////////////////////////////////////
     20 
     21 //////////////////////////////////////////////////////////////////////////////
     22 //CHECK#2
     23 if (__reached !== 1) {
     24 throw new Test262Error('#2: function expession inside of do-while expression is allowed');
     25 }
     26 //
     27 //////////////////////////////////////////////////////////////////////////////
     28 
     29 reportCompare(0, 0);