aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite/sputnik_converted/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A7_T8.js
blob: 5c8ce616244aa870e38bb1c82e7fa765fdcd82ba (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
 * @name: S7.3_A7_T8;
 * @section: 7.3;
 * @assertion: Line Terminators between operators are allowed;
 * @description: Insert Line Terminator in var x=y<z;  
*/


// Converted for Test262 from original Sputnik source

ES5Harness.registerTest( {
id: "S7.3_A7_T8",

path: "TestCases/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A7_T8.js",

assertion: "Line Terminators between operators are allowed",

description: "Insert Line Terminator in var x=y<z",

test: function testcase() {
   // CHECK#1
var y=2;
var z=3;
var
x
=
y
<
z
;
if (x !== true) {
  $ERROR('#1: var\\nx\\n=\\ny\\n<\\nz\\n; x === true. Actual: ' + (x));
}
x=0;

// CHECK#2
var y=2;
var z=3;
var
x
=
y
<
z
;
if (x !== true) {
  $ERROR('#2: var\\nx\\n=\\ny\\n<\\nz\\n; x === true. Actual: ' + (x));
}
x=0;

// CHECK#3
var y=2;
var z=3;
eval("\u2028var\u2028x\u2028=\u2028y\u2028<\u2028z\u2028");
if (x !== true) {
  $ERROR('#3: eval("\\u2028var\\u2028x\\u2028=\\u2028y\\u2028<\\u2028z\\u2028"); x === true. Actual: ' + (x));
}
x=0;

// CHECK#4
var y=2;
var z=3;
eval("\u2029var\u2029x\u2029=\u2029y\u2029<\u2029z\u2029");
if (x !== true) {
  $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029<\\u2029z\\u2029"); x === true. Actual: ' + (x));
}

 }
});