Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java |
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java |
index 28b2352c9dd5ff2971d754e44bf9a13fbdcf47f2..910fae9ec60e4c7932ac347ca44235a023b93655 100644 |
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java |
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticTypeWarningCodeTest.java |
@@ -26,6 +26,36 @@ public class StaticTypeWarningCodeTest extends ResolverTestCase { |
verify(source); |
} |
+ public void test_expectedOneListTypeArgument() throws Exception { |
+ Source source = addSource(createSource(// |
+ "main() {", |
+ " <int, int> [];", |
+ "}")); |
+ resolve(source); |
+ assertErrors(source, StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS); |
+ verify(source); |
+ } |
+ |
+ public void test_expectedTwoMapTypeArguments_one() throws Exception { |
+ Source source = addSource(createSource(// |
+ "main() {", |
+ " <int> {};", |
+ "}")); |
+ resolve(source); |
+ assertErrors(source, StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS); |
+ verify(source); |
+ } |
+ |
+ public void test_expectedTwoMapTypeArguments_three() throws Exception { |
+ Source source = addSource(createSource(// |
+ "main() {", |
+ " <int, int, int> {};", |
+ "}")); |
+ resolve(source); |
+ assertErrors(source, StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS); |
+ verify(source); |
+ } |
+ |
public void test_inconsistentMethodInheritance_paramCount() throws Exception { |
Source source = addSource(createSource(// |
"abstract class A {", |