summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/line-terminators/S7.3_A7_T6.js
blob: c6a75ab0b195b55175e3c6dac5c7b8e13185097b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: Line Terminators between operators are allowed
es5id: 7.3_A7_T6
description: Insert Line Terminator in var x=y>>z
---*/

// CHECK#1
var y=16;
var z=3;
var
x
=
y
>>
z
;
if (x !== 2) {
  throw new Test262Error('#1: var\\nx\\n=\\ny\\n>>\\nz\\n; x === 2. Actual: ' + (x));
}
x=0;

// CHECK#2
var y=16;
var z=3;
var
x
=
y
>>
z
;
if (x !== 2) {
  throw new Test262Error('#2: var\\nx\\n=\\ny\\n>>\\nz\\n; x === 2. Actual: ' + (x));
}
x=0;

// CHECK#3
var result;
var y=16;
var z=3;
eval("\u2028var\u2028x\u2028=\u2028y\u2028>>\u2028z\u2028; result = x;");
if (result !== 2) {
  throw new Test262Error('#3: eval("\\u2028var\\u2028x\\u2028=\\u2028y\\u2028>>\\u2028z\\u2028; result = x;"); result === 2. Actual: ' + (result));
}
result=0;

// CHECK#4
var y=16;
var z=3;
eval("\u2029var\u2029x\u2029=\u2029y\u2029>>\u2029z\u2029; result = x;");
if (result !== 2) {
  throw new Test262Error('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029>>\\u2029z\\u2029; result = x;"); result === 2. Actual: ' + (result));
}

reportCompare(0, 0);