Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(740)

Unified Diff: test/mjsunit/harmony/modules-html-comments.js

Issue 2009963002: [modules] Disable HTML-like comments Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update attribute/method name Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/parsing/scanner.cc ('K') | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/modules-html-comments.js
diff --git a/test/mjsunit/harmony/modules-html-comments.js b/test/mjsunit/harmony/modules-html-comments.js
new file mode 100644
index 0000000000000000000000000000000000000000..6184d5ffc6a80695c021eee4bf9eb5f59ec6c228
--- /dev/null
+++ b/test/mjsunit/harmony/modules-html-comments.js
@@ -0,0 +1,30 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// MODULE
+
+var x = 1;
+x --> 0;
+assertEquals(0, x, 'a');
+
+var x = 0; x <!-- x
+assertEquals(-1, x, 'b');
+
+var x = 1; x <!--x
+assertEquals(0, x, 'c');
+
+var x = 2; x <!-- x; x = 42;
+assertEquals(42, x, 'd');
+
+var x = 1; x <! x--;
+assertEquals(0, x, 'e');
+
+var x = 1; x <!- x--;
+assertEquals(0, x, 'f');
+
+var b = true <! true;
+assertFalse(b, 'g');
+
+var b = true <!- true;
+assertFalse(b, 'h');
« src/parsing/scanner.cc ('K') | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698