summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A7_T7.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A7_T7.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A7_T7.js56
1 files changed, 56 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A7_T7.js b/external/contributions/Google/sputnik_conformance_modified/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A7_T7.js
new file mode 100644
index 000000000..67e77b226
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A7_T7.js
@@ -0,0 +1,56 @@
+// 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_T7;
+ * @section: 7.3;
+ * @assertion: Line Terminators between operators are allowed;
+ * @description: Insert Line Terminator in var x=y<<z;
+*/
+
+// CHECK#1
+var y=2;
+var z=3;
+var
+x
+=
+y
+<<
+z
+;
+if (x !== 16) {
+ $ERROR('#1: var\\nx\\n=\\ny\\n<<\\nz\\n; x === 16. Actual: ' + (x));
+}
+x=0;
+
+// CHECK#2
+var y=2;
+var z=3;
+var
+x
+=
+y
+<<
+z
+;
+if (x !== 16) {
+ $ERROR('#2: var\\nx\\n=\\ny\\n<<\\nz\\n; x ===16 ');
+}
+x=0;
+
+// CHECK#3
+var y=2;
+var z=3;
+eval("\u2028var\u2028x\u2028=\u2028y\u2028<<\u2028z\u2028");
+if (x !== 16) {
+ $ERROR('#3: eval("\\u2028var\\u2028x\\u2028=\\u2028y\\u2028<<\\u2028z\\u2028"); x === 16. Actual: ' + (x));
+}
+x=0;
+
+// CHECK#4
+var y=2;
+var z=3;
+eval("\u2029var\u2029x\u2029=\u2029y\u2029<<\u2029z\u2029");
+if (x !== 16) {
+ $ERROR('#4: eval("\\u2029var\\u2029x\\u2029=\\u2029y\\u2029<<\\u2029z\\u2029"); x === 16. Actual: ' + (x));
+}