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

Unified Diff: pkg/analysis_server/test/analysis/notification_navigation_test.dart

Issue 882823002: Issue 22143. Navigation from super initializers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_navigation.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/analysis/notification_navigation_test.dart
diff --git a/pkg/analysis_server/test/analysis/notification_navigation_test.dart b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
index 0e810d1c61200a94221270922e964c466113ccfe..b04ff9c5a9dc860b71b30b468cb8dd7a9fe11153 100644
--- a/pkg/analysis_server/test/analysis/notification_navigation_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
@@ -581,6 +581,45 @@ part "test_unit.dart";
});
}
+ test_superConstructorInvocation() {
+ addTestFile('''
+class A {
+ A() {}
+ A.named() {}
+}
+class B extends A {
+ B() : super();
+ B.named() : super.named();
+}
+''');
+ return prepareNavigation().then((_) {
+ {
+ assertHasRegionString('super');
+ assertHasTarget('A() {}', 0);
+ }
+ {
+ assertHasRegionString('super.named');
+ assertHasTarget('named() {}');
+ }
+ });
+ }
+
+ test_superConstructorInvocation_synthetic() {
+ addTestFile('''
+class A {
+}
+class B extends A {
+ B() : super();
+}
+''');
+ return prepareNavigation().then((_) {
+ {
+ assertHasRegionString('super');
+ assertHasTarget('A {');
+ }
+ });
+ }
+
test_targetElement() {
addTestFile('''
class AAA {}
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_navigation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698