| 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 6cd8bf7827b2cbec2839d989b11f1a7139a16340..b1ceb08e0eb54b7b4240bafce30e19cd3119b896 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
|
| @@ -2833,6 +2833,20 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| check_wrongNumberOfParametersForOperator1("[]");
|
| }
|
|
|
| + public void test_wrongNumberOfParametersForSetter_function_named() throws Exception {
|
| + Source source = addSource("set x({p}) {}");
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER);
|
| + verify(source);
|
| + }
|
| +
|
| + public void test_wrongNumberOfParametersForSetter_function_optional() throws Exception {
|
| + Source source = addSource("set x([p]) {}");
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER);
|
| + verify(source);
|
| + }
|
| +
|
| public void test_wrongNumberOfParametersForSetter_function_tooFew() throws Exception {
|
| Source source = addSource("set x() {}");
|
| resolve(source);
|
| @@ -2847,6 +2861,26 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| + public void test_wrongNumberOfParametersForSetter_method_named() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " set x({p}) {}",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER);
|
| + verify(source);
|
| + }
|
| +
|
| + public void test_wrongNumberOfParametersForSetter_method_optional() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " set x([p]) {}",
|
| + "}"));
|
| + 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 {",
|
|
|