Chromium Code Reviews| Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java |
| diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java |
| index 4d60e1bb8fe6090baebb4b67f95d9cf77d047710..fd42e8eec52105dc65f5d32cf44f0b1c3390e9da 100644 |
| --- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java |
| +++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java |
| @@ -487,6 +487,18 @@ public class StaticWarningCodeTest extends ResolverTestCase { |
| verify(source); |
| } |
| + // TODO(scheglov) |
|
jwren
2013/05/22 19:03:16
Did you mean to include the TODO in the CL?
scheglov
2013/05/22 19:37:31
Thank you, removed.
|
| + public void test_extraPositionalArguments() throws Exception { |
| + Source source = addSource(createSource(// |
| + "f() {}", |
| + "main() {", |
| + " f(0, 1, '2');", |
| + "}")); |
| + resolve(source); |
| + assertErrors(StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS); |
| + verify(source); |
| + } |
| + |
| public void test_fieldInitializerWithInvalidType() throws Exception { |
| Source source = addSource(createSource(// |
| "class A {", |
| @@ -980,6 +992,18 @@ public class StaticWarningCodeTest extends ResolverTestCase { |
| verify(source); |
| } |
| + // TODO(scheglov) |
| + public void test_notEnoughRequiredArguments() throws Exception { |
| + Source source = addSource(createSource(// |
| + "f(int a, String b) {}", |
| + "main() {", |
| + " f();", |
| + "}")); |
| + resolve(source); |
| + assertErrors(StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS); |
| + verify(source); |
| + } |
| + |
| public void test_partOfDifferentLibrary() throws Exception { |
| Source source = addSource(createSource(// |
| "library lib;", |
| @@ -1143,4 +1167,16 @@ public class StaticWarningCodeTest extends ResolverTestCase { |
| resolve(source); |
| assertErrors(StaticWarningCode.UNDEFINED_IDENTIFIER); |
| } |
| + |
| + // TODO(scheglov) |
| + public void test_undefinedNamedParameter() throws Exception { |
| + Source source = addSource(createSource(// |
| + "f({a, b}) {}", |
| + "main() {", |
| + " f(c: 1);", |
| + "}")); |
| + resolve(source); |
| + assertErrors(StaticWarningCode.UNDEFINED_NAMED_PARAMETER); |
| + // no verify(), 'c' is not resolved |
| + } |
| } |