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

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

Issue 15028010: Report CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER for top-level setters. (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 1e8a2acfd3f2a5c3a08f280a23a801b90c1ea54b..45cf1b9e9903052154f6475d1776ca50e2f67ffc 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
@@ -1949,7 +1949,21 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
// We cannot verify resolution with an unresolvable URI: '${'a'}.dart'
}
- public void test_wrongNumberOfParametersForSetter_tooFew() throws Exception {
+ public void test_wrongNumberOfParametersForSetter_function_tooFew() throws Exception {
+ Source source = addSource("set x() {}");
+ resolve(source);
+ assertErrors(CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER);
+ verify(source);
+ }
+
+ public void test_wrongNumberOfParametersForSetter_function_tooMany() throws Exception {
+ Source source = addSource("set x(a, b) {}");
+ resolve(source);
+ assertErrors(CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER);
+ verify(source);
+ }
+
+ public void test_wrongNumberOfParametersForSetter_method_tooFew() throws Exception {
Source source = addSource(createSource(//
"class A {",
" set x() {}",
@@ -1959,7 +1973,7 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
verify(source);
}
- public void test_wrongNumberOfParametersForSetter_tooMany() throws Exception {
+ public void test_wrongNumberOfParametersForSetter_method_tooMany() throws Exception {
Source source = addSource(createSource(//
"class A {",
" set x(a, b) {}",

Powered by Google App Engine
This is Rietveld 408576698