tor-browser

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

S12.5_A12_T3.js (1131B)


      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: Embedded "if/else" constructions are allowed
      6 es5id: 12.5_A12_T3
      7 description: Using embedded "if/else" into "if" without "else" constructions
      8 ---*/
      9 
     10 //CHECK# 1
     11 if(true)
     12  if (false)
     13    throw new Test262Error('#1.1: At embedded "if/else" constructions engine must select right branches');
     14  else
     15    ;
     16 
     17 //CHECK# 2
     18 if(true)
     19  if (true)
     20    ;
     21  else
     22    throw new Test262Error('#2.1: At embedded "if/else" constructions engine must select right branches');
     23 
     24 //CHECK# 3
     25 if(false)
     26  if (true)
     27    throw new Test262Error('#3.1: At embedded "if/else" constructions engine must select right branches');
     28  else
     29    throw new Test262Error('#3.2: At embedded "if/else" constructions engine must select right branches');
     30 
     31 //CHECK# 4
     32 if(false)
     33  if (true)
     34    throw new Test262Error('#4.1: At embedded "if/else" constructions engine must select right branches');
     35  else
     36    throw new Test262Error('#4.2: At embedded "if/else" constructions engine must select right branches');
     37 
     38 reportCompare(0, 0);