| Index: compiler/javatests/com/google/dart/compiler/parser/NegativeParserTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/parser/NegativeParserTest.java b/compiler/javatests/com/google/dart/compiler/parser/NegativeParserTest.java
|
| index d9084e424303be35b2a14a30b132283e5e933eb1..25c21ab8337251b62ce413bb1a390baf23970fb4 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/parser/NegativeParserTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/parser/NegativeParserTest.java
|
| @@ -313,15 +313,16 @@ public class NegativeParserTest extends CompilerTestCase {
|
| }
|
|
|
| public void testInvalidStringInterpolation() {
|
| - parseExpectErrors(Joiner.on("\n").join(
|
| - "void main() {",
|
| - " print(\"1 ${42} 2 ${} 3\");",
|
| - " print(\"1 ${42} 2 ${10;} 3\");",
|
| - " print(\"1 ${42} 2 ${10,20} 3\");",
|
| - " print(\"1 ${42} 2 ${10 20} 3\");",
|
| - " print(\"$\");",
|
| - " print(\"$",
|
| - "}"),
|
| + parseExpectErrors(
|
| + Joiner.on("\n").join(
|
| + "void main() {",
|
| + " print(\"1 ${42} 2 ${} 3\");",
|
| + " print(\"1 ${42} 2 ${10;} 3\");",
|
| + " print(\"1 ${42} 2 ${10,20} 3\");",
|
| + " print(\"1 ${42} 2 ${10 20} 3\");",
|
| + " print(\"$\");",
|
| + " print(\"$",
|
| + "}"),
|
| errEx(ParserErrorCode.UNEXPECTED_TOKEN, 2, 22, 1),
|
| errEx(ParserErrorCode.EXPECTED_TOKEN, 2, 23, 3),
|
| errEx(ParserErrorCode.EXPECTED_TOKEN, 3, 24, 1),
|
| @@ -381,6 +382,17 @@ public class NegativeParserTest extends CompilerTestCase {
|
| " abstract foo() {",
|
| " }",
|
| "}"),
|
| - errEx(ParserErrorCode.ABSTRACT_METHOD_WITH_BODY, 3, 3, 8));
|
| + errEx(ParserErrorCode.ABSTRACT_METHOD_WITH_BODY, 3, 12, 3));
|
| + }
|
| +
|
| + public void test_interfaceMethodWithBody() {
|
| + parseExpectErrors(
|
| + Joiner.on("\n").join(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "interface A {",
|
| + " foo() {",
|
| + " }",
|
| + "}"),
|
| + errEx(ParserErrorCode.INTERFACE_METHOD_WITH_BODY, 3, 3, 3));
|
| }
|
| }
|
|
|