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

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

Issue 9270016: Issue 932. Checks for various named arguments cases. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweaks for comments, changes in tests. Created 8 years, 11 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
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 b4e869b91fcb4051666eebb7de10327fa050c584..66a4383c648a6f28f4b901ee7a09874486ac4dc9 100644
--- a/compiler/javatests/com/google/dart/compiler/parser/NegativeParserTest.java
+++ b/compiler/javatests/com/google/dart/compiler/parser/NegativeParserTest.java
@@ -434,4 +434,15 @@ public class NegativeParserTest extends CompilerTestCase {
"}"),
parserRunner.getDartUnit().toSource());
}
+
+ public void test_positionalArgument_afterNamed() {
+ parseExpectErrors(
+ Joiner.on("\n").join(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "f(r1, [n1, n2]) {}",
+ "foo() {",
+ " f(-1, n1: 1, 2);",
+ "}"),
+ errEx(ParserErrorCode.POSITIONAL_AFTER_NAMED_ARGUMENT, 4, 16, 1));
+ }
}

Powered by Google App Engine
This is Rietveld 408576698