| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package com.google.dart.compiler.parser; | 5 package com.google.dart.compiler.parser; |
| 6 | 6 |
| 7 import com.google.common.base.Joiner; | 7 import com.google.common.base.Joiner; |
| 8 import com.google.dart.compiler.DartCompilerListener; | 8 import com.google.dart.compiler.DartCompilerListener; |
| 9 import com.google.dart.compiler.DartSourceTest; | 9 import com.google.dart.compiler.DartSourceTest; |
| 10 import com.google.dart.compiler.ast.DartArrayLiteral; | 10 import com.google.dart.compiler.ast.DartArrayLiteral; |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 public void testBogusEscapedNewline() throws Exception { | 626 public void testBogusEscapedNewline() throws Exception { |
| 627 parseUnit("phony_bogus_escaped_newline.dart", | 627 parseUnit("phony_bogus_escaped_newline.dart", |
| 628 Joiner.on("\n").join( | 628 Joiner.on("\n").join( |
| 629 "class A {", | 629 "class A {", |
| 630 " var foo = \"not really multiline\\\n", | 630 " var foo = \"not really multiline\\\n", |
| 631 "\";", | 631 "\";", |
| 632 "}"), | 632 "}"), |
| 633 ParserErrorCode.UNEXPECTED_TOKEN, 2, 13, | 633 ParserErrorCode.UNEXPECTED_TOKEN, 2, 13, |
| 634 ParserErrorCode.EXPECTED_TOKEN, 4, 1); | 634 ParserErrorCode.EXPECTED_TOKEN, 4, 1); |
| 635 } | 635 } |
| 636 |
| 637 public void testLabelledCaseStatements() throws Exception { |
| 638 parseUnit("phony_labelled_case_statements.dart", |
| 639 Joiner.on("\n").join( |
| 640 "method() {", |
| 641 " switch(1) {", |
| 642 " A: case 0:", |
| 643 " B: case 1:", |
| 644 " break;", |
| 645 " }", |
| 646 "}")); |
| 647 } |
| 636 } | 648 } |
| OLD | NEW |