js/src/tests/test262/ch07/7.9/S7.9_A5.6_T2.js

branch
TOR_BUG_3246
changeset 6
8bccb770b82d
equal deleted inserted replaced
-1:000000000000 0:81ef0f6fd5bd
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 * Since LineTerminator between Postfix Increment/Decrement Operator(I/DO) and operand is not allowed but
6 * between Prefix I/DO and operand admitted, Postfix I/DO in combination with prefix I/DO after automatic semicolon insertion gives valid result
7 *
8 * @path ch07/7.9/S7.9_A5.6_T2.js
9 * @description Try use Variable1 \n -- \n Variable2 construction
10 */
11
12 var x=0, y=2;
13
14 x
15 --
16 y
17
18 //////////////////////////////////////////////////////////////////////////////
19 //CHECK#1
20 if ((x!==0)&(y!==1)) {
21 $ERROR('#1: Check Postfix Increment Operator for automatic semicolon insertion');
22 }
23 //
24 //////////////////////////////////////////////////////////////////////////////
25
26 x
27 --y
28
29 //////////////////////////////////////////////////////////////////////////////
30 //CHECK#2
31 if ((x!==0)&(y!==0)) {
32 $ERROR('#2: Check Postfix Increment Operator for automatic semicolon insertion');
33 }
34 //
35 //////////////////////////////////////////////////////////////////////////////
36
37

mercurial