S7.9_A5.8_T1.js (1289B)
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: | 6 Since LineTerminator(LT) between Postfix Increment/Decrement Operator(I/DO) and operand is admitted, 7 Additive/Substract Operator(A/SO) in combination with I/DO separated by LT or white spaces after automatic semicolon insertion gives valid result 8 es5id: 7.9_A5.8_T1 9 description: Try use Variable1 \n + \n ++ \n Variable2 construction 10 ---*/ 11 12 var x=0, y=0; 13 var z= 14 x 15 + 16 ++ 17 y 18 19 ////////////////////////////////////////////////////////////////////////////// 20 //CHECK#1 21 if ((z!==1)&&(y!==1)&&(x!==0)) { 22 throw new Test262Error('#1: '); 23 } 24 // 25 ////////////////////////////////////////////////////////////////////////////// 26 27 z= 28 x 29 + ++ 30 y 31 32 ////////////////////////////////////////////////////////////////////////////// 33 //CHECK#2 34 if ((z!==2)&&(y!==2)&&(x!==0)) { 35 throw new Test262Error(''); 36 } 37 // 38 ////////////////////////////////////////////////////////////////////////////// 39 40 z= 41 x 42 + ++ 43 y 44 45 ////////////////////////////////////////////////////////////////////////////// 46 //CHECK#3 47 if ((z!==3)&&(y!==3)&&(x!==0)) { 48 throw new Test262Error(''); 49 } 50 // 51 ////////////////////////////////////////////////////////////////////////////// 52 53 reportCompare(0, 0);