S12.5_A12_T4.js (884B)
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_T4 7 description: Using embedded "if" into "if" 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 15 //CHECK# 2 16 var c=0; 17 if(true) 18 if (true) 19 c=2; 20 if (c!==2) 21 throw new Test262Error('#2: At embedded "if/else" constructions engine must select right branches'); 22 23 //CHECK# 3 24 if(false) 25 if (true) 26 throw new Test262Error('#3.1: At embedded "if/else" constructions engine must select right branches'); 27 28 //CHECK# 4 29 if(false) 30 if (true) 31 throw new Test262Error('#4.1: At embedded "if/else" constructions engine must select right branches'); 32 33 reportCompare(0, 0);