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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java

Issue 17582003: Report ParserErrorCode.NORMAL_BEFORE_OPTIONAL_PARAMETERS (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
index 65dc6094a9cbff42fcb01c39c25e9b8b5c327a51..68fa6dba9f1eafb0b35d8631d537e0d013bd3547 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/ErrorParserTest.java
@@ -1000,6 +1000,14 @@ public class ErrorParserTest extends ParserTestCase {
ParserErrorCode.NON_USER_DEFINABLE_OPERATOR);
}
+ public void test_optionalAfterNormalParameters_named() throws Exception {
+ parseCompilationUnit("f({a}, b) {}", ParserErrorCode.NORMAL_BEFORE_OPTIONAL_PARAMETERS);
+ }
+
+ public void test_optionalAfterNormalParameters_positional() throws Exception {
+ parseCompilationUnit("f([a], b) {}", ParserErrorCode.NORMAL_BEFORE_OPTIONAL_PARAMETERS);
+ }
+
public void test_positionalAfterNamedArgument() throws Exception {
parse("parseArgumentList", "(x: 1, 2)", ParserErrorCode.POSITIONAL_AFTER_NAMED_ARGUMENT);
}

Powered by Google App Engine
This is Rietveld 408576698