| 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 3a72c7a692ec9ddd0720744ec81e17065fff2a6d..3e070aa1f30df48360a0addc9deefed8d78b7d1e 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
|
| @@ -193,6 +193,27 @@ public class SyntaxTest extends AbstractParserTest {
|
| }
|
|
|
| /**
|
| + * There was bug that class instead of case in switch caused infinite parsing loop.
|
| + * <p>
|
| + * http://code.google.com/p/dart/issues/detail?id=7999
|
| + */
|
| + public void test_switch_class_inCase() {
|
| + DartParserRunner runner = parseSource(Joiner.on("\n").join(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "void main() {",
|
| + " print((e) {",
|
| + " switch (e) {",
|
| + " case 'Up': cursor.(); break;",
|
| + " class LoopClass { var myData; }",
|
| + " case 'Down':",
|
| + " }",
|
| + " }); ",
|
| + "}",
|
| + ""));
|
| + assertTrue(runner.getErrorCount() > 0);
|
| + }
|
| +
|
| + /**
|
| * There was bug that handling missing identifier (method name) after "cursor." in switch caused
|
| * infinite parsing loop.
|
| * <p>
|
|
|