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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java

Issue 15745013: Report parameters/arguments count mismatch (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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/resolver/CompileTimeErrorCodeTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
index bbec69466d9f0f6094564dafac9a48380b8801e0..89b81c2f17ffc5fa14926b81a69619b9061ff539 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
@@ -86,14 +86,6 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
verify(source);
}
- public void fail_duplicateNamedArgument() throws Exception {
- Source source = addSource(createSource(//
- "f({a, a}) {}"));
- resolve(source);
- assertErrors(CompileTimeErrorCode.DUPLICATE_NAMED_ARGUMENT);
- verify(source);
- }
-
public void fail_extendsOrImplementsDisallowedClass_extends_null() throws Exception {
Source source = addSource(createSource(//
"class A extends Null {}"));
@@ -998,6 +990,17 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
verify(librarySource);
}
+ public void test_duplicateNamedArgument() throws Exception {
+ Source source = addSource(createSource(//
+ "f({a, b}) {}",
+ "main() {",
+ " f(a: 1, a: 2);",
+ "}"));
+ resolve(source);
+ assertErrors(CompileTimeErrorCode.DUPLICATE_NAMED_ARGUMENT);
+ verify(source);
+ }
+
public void test_exportOfNonLibrary() throws Exception {
Source source = addSource(createSource(//
"library L;",
@@ -2202,7 +2205,7 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
"class A {",
" const A(p);",
"}",
- "class B {",
+ "class B extends A {",
" static C;",
" const B() : super(C);",
"}"));

Powered by Google App Engine
This is Rietveld 408576698