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

Unified Diff: test/cctest/test-parsing.cc

Issue 1806063002: [parser] report illegal token error in ParseMemberExpressionContinuation() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « src/parsing/parser-base.h ('k') | test/message/regress/regress-4829-1.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index c881f868a0472e146f611469d9b0ff30f34f7aa1..16139a56e5c51bf9d6aee12aff9a59a5aca333b1 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -7189,6 +7189,36 @@ TEST(MiscSyntaxErrors) {
RunParserSyncTest(context_data, error_data, kError, NULL, 0, NULL, 0);
}
+
+TEST(EscapeSequenceErrors) {
+ // clang-format off
+ const char* context_data[][2] = {
+ { "'", "'" },
+ { "\"", "\"" },
+ { "`", "`" },
+ { "`${'", "'}`" },
+ { "`${\"", "\"}`" },
+ { "`${`", "`}`" },
+ { "f(tag`", "`);" },
+ { NULL, NULL }
+ };
+ const char* error_data[] = {
+ "\\uABCG",
+ "\\u{ZZ}",
+ "\\u{FFZ}",
+ "\\u{FFFFFFFFFF }",
+ "\\u{110000}",
+ "\\u{110000",
+ "\\u{FFFD }",
+ "\\xZF",
+ NULL
+ };
+ // clang-format on
+
+ RunParserSyncTest(context_data, error_data, kError, NULL, 0, NULL, 0);
+}
+
+
TEST(FunctionSentErrors) {
// clang-format off
const char* context_data[][2] = {
« no previous file with comments | « src/parsing/parser-base.h ('k') | test/message/regress/regress-4829-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698