| 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 911193dc26263ea5f9ff704a5ae31d2cbaf97ef3..a9bc09cc96a2a7362f9a7977624caa71b6177029 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
|
| @@ -1109,6 +1109,19 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| + public void test_extraPositionalArguments_const() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " const A();",
|
| + "}",
|
| + "main() {",
|
| + " const A(0);",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS);
|
| + verify(source);
|
| + }
|
| +
|
| public void test_fieldInitializedByMultipleInitializers() throws Exception {
|
| Source source = addSource(createSource(//
|
| "class A {",
|
| @@ -2292,6 +2305,19 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| + public void test_notEnoughRequiredArguments_const() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " const A(int p);",
|
| + "}",
|
| + "main() {",
|
| + " const A();",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS);
|
| + verify(source);
|
| + }
|
| +
|
| public void test_optionalParameterInOperator_named() throws Exception {
|
| Source source = addSource(createSource(//
|
| "class A {",
|
| @@ -2709,6 +2735,19 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
|
| verify(source);
|
| }
|
|
|
| + public void test_undefinedNamedParameter() throws Exception {
|
| + Source source = addSource(createSource(//
|
| + "class A {",
|
| + " const A();",
|
| + "}",
|
| + "main() {",
|
| + " const A(p: 0);",
|
| + "}"));
|
| + resolve(source);
|
| + assertErrors(CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER);
|
| + // no verify(), 'p' is not resolved
|
| + }
|
| +
|
| public void test_uriDoesNotExist_export() throws Exception {
|
| Source source = addSource(createSource(//
|
| "export 'unknown.dart';"));
|
|
|