S7.3_A7_T8.js (1182B)
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: Line Terminators between operators are allowed 6 es5id: 7.3_A7_T8 7 description: Insert Line Terminator in var x=y<z 8 ---*/ 9 10 // CHECK#1 11 var y=2; 12 var z=3; 13 var 14 x 15 = 16 y 17 < 18 z 19 ; 20 if (x !== true) { 21 throw new Test262Error('#1: var\\nx\\n=\\ny\\n<\\nz\\n; x === true. Actual: ' + (x)); 22 } 23 x=0; 24 25 // CHECK#2 26 var y=2; 27 var z=3; 28 var 29 x 30 = 31 y 32 < 33 z 34 ; 35 if (x !== true) { 36 throw new Test262Error('#2: var\\nx\\n=\\ny\\n<\\nz\\n; x === true. Actual: ' + (x)); 37 } 38 x=0; 39 40 // CHECK#3 41 var result; 42 var y=2; 43 var z=3; 44 eval("\u2028var\u2028x\u2028=\u2028y\u2028<\u2028z\u2028; result = x;"); 45 if (result !== true) { 46 throw new Test262Error('#3: eval("\\u2028var\\u2028x\\u2028=\\u2028y\\u2028<\\u2028z\\u2028; result = x;"); result === true. Actual: ' + (result)); 47 } 48 result=0; 49 50 // CHECK#4 51 var y=2; 52 var z=3; 53 eval("\u2029var\u2029x\u2029=\u2029y\u2029<\u2029z\u2029; result = x;"); 54 if (result !== true) { 55 throw new Test262Error('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029<\\u2029z\\u2029; result = x;"); result === true. Actual: ' + (result)); 56 } 57 58 reportCompare(0, 0);