Debian Codegraph @

js/src/tests/test262/language/asi/S7.9_A5.2_T1.js

raw
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: Check Prefix Increment Operator for automatic semicolon insertion
6 es5id: 7.9_A5.2_T1
7 description: Try use Variable1 \n ++Variable2 construction
8 ---*/
9
10 //CHECK#1
11 var x = 0;
12 var y = 0;
13 x
14 ++y
15 if (x !== 0) {
16 throw new Test262Error('#1: Check Prefix Increment Operator for automatic semicolon insertion');
17 } else {
18 if (y !== 1) {
19 throw new Test262Error('#2: Check Prefix Increment Operator for automatic semicolon insertion');
20 }
21 }
22
23 reportCompare(0, 0);