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

Unified Diff: pkg/analyzer/test/generated/element_test.dart

Issue 103233003: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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
« no previous file with comments | « pkg/analyzer/test/generated/ast_test.dart ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/element_test.dart
diff --git a/pkg/analyzer/test/generated/element_test.dart b/pkg/analyzer/test/generated/element_test.dart
index 496ce5e11ebe00cc10abcc651071a79582e865d0..cfa59130da02691ce1838a2b6ec0e873465001e0 100644
--- a/pkg/analyzer/test/generated/element_test.dart
+++ b/pkg/analyzer/test/generated/element_test.dart
@@ -1021,6 +1021,20 @@ class InterfaceTypeImplTest extends EngineTestCase {
JUnitTestCase.assertFalse(0 == typeA.hashCode);
}
+ void test_isAssignableTo_typeVariables() {
+ ClassElement classA = ElementFactory.classElement2("A", ["E"]);
+ ClassElement classB = ElementFactory.classElement2("B", ["F", "G"]);
+ InterfaceTypeImpl typeAF = new InterfaceTypeImpl.con1(classA);
+ typeAF.typeArguments = <Type2> [classB.typeParameters[0].type];
+ InterfaceTypeImpl typeAG = new InterfaceTypeImpl.con1(classA);
+ typeAG.typeArguments = <Type2> [classB.typeParameters[1].type];
+ JUnitTestCase.assertFalse(typeAG.isAssignableTo(typeAF));
+ }
+
+ void test_isAssignableTo_void() {
+ JUnitTestCase.assertFalse(VoidTypeImpl.instance.isAssignableTo(_typeProvider.intType));
+ }
+
void test_isDirectSupertypeOf_extends() {
ClassElement classA = ElementFactory.classElement2("A", []);
ClassElement classB = ElementFactory.classElement("B", classA.type, []);
@@ -1737,6 +1751,14 @@ class InterfaceTypeImplTest extends EngineTestCase {
final __test = new InterfaceTypeImplTest();
runJUnitTest(__test, __test.test_hashCode);
});
+ _ut.test('test_isAssignableTo_typeVariables', () {
+ final __test = new InterfaceTypeImplTest();
+ runJUnitTest(__test, __test.test_isAssignableTo_typeVariables);
+ });
+ _ut.test('test_isAssignableTo_void', () {
+ final __test = new InterfaceTypeImplTest();
+ runJUnitTest(__test, __test.test_isAssignableTo_void);
+ });
_ut.test('test_isDirectSupertypeOf_extends', () {
final __test = new InterfaceTypeImplTest();
runJUnitTest(__test, __test.test_isDirectSupertypeOf_extends);
@@ -2791,7 +2813,7 @@ class FunctionTypeImplTest extends EngineTestCase {
void test_isSubtypeOf_baseCase_classFunction() {
ClassElementImpl functionElement = ElementFactory.classElement2("Function", []);
- InterfaceTypeImpl functionType = new InterfaceTypeImpl_24(functionElement);
+ InterfaceTypeImpl functionType = new InterfaceTypeImpl_25(functionElement);
FunctionType f = ElementFactory.functionElement("f").type;
JUnitTestCase.assertTrue(f.isSubtypeOf(functionType));
}
@@ -3290,8 +3312,8 @@ class FunctionTypeImplTest extends EngineTestCase {
}
}
-class InterfaceTypeImpl_24 extends InterfaceTypeImpl {
- InterfaceTypeImpl_24(ClassElement arg0) : super.con1(arg0);
+class InterfaceTypeImpl_25 extends InterfaceTypeImpl {
+ InterfaceTypeImpl_25(ClassElement arg0) : super.con1(arg0);
bool get isDartCoreFunction => true;
}
« no previous file with comments | « pkg/analyzer/test/generated/ast_test.dart ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698