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

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

Issue 1465303003: Generate separate navigation regions for 'super' and optional 'name'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/domains/analysis/navigation_dart.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 68b347c18197d2092fccf8bd7d4b3b401c031605..ff643e3c55a26c125d41a3076d1346cf9c5dc78d 100644
--- a/pkg/analysis_server/test/analysis/notification_navigation_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
@@ -797,6 +797,30 @@ main() {
});
}
+ test_redirectingConstructorInvocation() {
+ addTestFile('''
+class A {
+ A() {}
+ A.foo() : this();
+ A.bar() : this.foo();
+}
+''');
+ return prepareNavigation().then((_) {
+ {
+ assertHasRegion('this();');
+ assertHasTarget('A() {}', 0);
+ }
+ {
+ assertHasRegion('this.foo');
+ assertHasTarget('foo() :');
+ }
+ {
+ assertHasRegion('foo();');
+ assertHasTarget('foo() :');
+ }
+ });
+ }
+
test_string_export() {
var libCode = 'library lib;';
var libFile = addFile('$projectPath/bin/lib.dart', libCode);
@@ -878,7 +902,11 @@ class B extends A {
assertHasTarget('A() {}', 0);
}
{
- assertHasRegionString('super.named');
+ assertHasRegion('super.named');
+ assertHasTarget('named() {}');
+ }
+ {
+ assertHasRegion('named();');
assertHasTarget('named() {}');
}
});
« no previous file with comments | « pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698