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

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

Issue 11238024: Issue 5621. Report error when { is missing in 'switch' (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/DartParser.java ('k') | no next file » | 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 4b96e97d9a03ff04a0aa7a9b8a8a218dd9a1c151..64474bd21f4b591d888c7dc22ce1892a86b71687 100644
--- a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
+++ b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
@@ -64,6 +64,16 @@ public class SyntaxTest extends AbstractParserTest {
assertEquals("import ;\n", dir.toSource());
}
+ public void test_switch_noLBrace() {
+ parseUnit("test.dart", Joiner.on("\n").join(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "main() {",
+ " switch (0)",
+ "}",
+ ""),
+ ParserErrorCode.EXPECTED_TOKEN, 3, 12);
+ }
+
public void test_getter() {
parseUnit("getter.dart", Joiner.on("\n").join(
"class G {",
« no previous file with comments | « compiler/java/com/google/dart/compiler/parser/DartParser.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698