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

Unified Diff: pkg/analyzer/test/src/task/dart_test.dart

Issue 1052053002: Resolve type hierarchies for all units of the library's import closure. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 months 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
« pkg/analyzer/lib/task/model.dart ('K') | « pkg/analyzer/lib/task/model.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/dart_test.dart
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
index c87a7e6db953722c4c4a390bda2af56d9609019c..4dd1675da55c067884f77cccfd494ec1484d6a26 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -1326,6 +1326,45 @@ class C extends A {}
expect(classC.supertype.displayName, 'A');
}
}
+
+ test_perform_deep() {
+ Source sourceA = _newSource('/a.dart', '''
+library a;
+import 'b.dart';
+class A extends B {}
+''');
+ _newSource('/b.dart', '''
+library b;
+import 'c.dart';
+part 'b2.dart';
+class B extends B2 {}
+''');
+ _newSource('/b2.dart', '''
+part of b;
+class B2 extends C {}
+''');
+ _newSource('/c.dart', '''
+library c;
+class C {}
+''');
+ _computeResult(sourceA, LIBRARY_ELEMENT5);
+ expect(task, new isInstanceOf<ResolveLibraryTypeNamesTask>());
+ // validate
+ LibraryElement library = outputs[LIBRARY_ELEMENT5];
+ {
+ ClassElement clazz = library.getType('A');
+ expect(clazz.displayName, 'A');
+ clazz = clazz.supertype.element;
+ expect(clazz.displayName, 'B');
+ clazz = clazz.supertype.element;
+ expect(clazz.displayName, 'B2');
+ clazz = clazz.supertype.element;
+ expect(clazz.displayName, 'C');
+ clazz = clazz.supertype.element;
+ expect(clazz.displayName, 'Object');
+ expect(clazz.supertype, isNull);
+ }
+ }
}
@reflectiveTest
« pkg/analyzer/lib/task/model.dart ('K') | « pkg/analyzer/lib/task/model.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698