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

Unified Diff: compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java

Issue 10540133: Fix for issue 1351 - Analyzer accepts non-multiline strings with newlines (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | « compiler/java/com/google/dart/compiler/parser/DartScanner.java ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
index 069f1431cd02b76083983b96b4d9cbaba465e2b7..2bdfe045827bb0f266daafb4aa1facbddd33a217 100644
--- a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
+++ b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
@@ -541,7 +541,7 @@ public class SyntaxTest extends AbstractParserTest {
ParserErrorCode.SUPER_CANNOT_BE_USED_AS_THE_SECOND_OPERAND, 13, 14,
ParserErrorCode.SUPER_CANNOT_BE_USED_AS_THE_SECOND_OPERAND, 15, 13);
}
-
+
public void testBreakOutsideLoop() throws Exception {
parseUnit("phony_lone_super_expression1.dart",
Joiner.on("\n").join(
@@ -559,6 +559,17 @@ public class SyntaxTest extends AbstractParserTest {
ParserErrorCode.BREAK_OUTSIDE_OF_LOOP, 4, 10,
ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP, 7, 13,
ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP, 8, 18,
- ParserErrorCode.BREAK_OUTSIDE_OF_LOOP, 9, 35);
+ ParserErrorCode.BREAK_OUTSIDE_OF_LOOP, 9, 35);
+ }
+
+ public void testBogusEscapedNewline() throws Exception {
+ parseUnit("phony_bogus_escaped_newline.dart",
+ Joiner.on("\n").join(
+ "class A {",
+ " var foo = \"not really multiline\\\n",
+ "\";",
+ "}"),
+ ParserErrorCode.UNEXPECTED_TOKEN, 2, 13,
+ ParserErrorCode.EXPECTED_TOKEN, 4, 1);
}
}
« no previous file with comments | « compiler/java/com/google/dart/compiler/parser/DartScanner.java ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698