Index: pkg/analysis_server/test/analysis/get_navigation_test.dart |
diff --git a/pkg/analysis_server/test/analysis/get_navigation_test.dart b/pkg/analysis_server/test/analysis/get_navigation_test.dart |
index 34a8010863849a954dcd45255254e5f0c7bd1cea..fb4916975501913f5919b8b1cf7692cc5773c0f1 100644 |
--- a/pkg/analysis_server/test/analysis/get_navigation_test.dart |
+++ b/pkg/analysis_server/test/analysis/get_navigation_test.dart |
@@ -58,6 +58,48 @@ main() { |
return _checkInvalid(file, -1, -1); |
} |
+ test_issue24599_importDirective() async { |
+ addTestFile(''' |
+import 'dart:math'; |
+ |
+main() { |
+}'''); |
+ await waitForTasksFinished(); |
+ await _getNavigation(testFile, 0, 17); |
+ expect(regions, hasLength(1)); |
+ assertHasRegionString("'dart:math'"); |
+ expect(testTargets, hasLength(1)); |
+ expect(testTargets[0].kind, ElementKind.LIBRARY); |
+ } |
+ |
+ test_issue24599_importKeyword() async { |
+ addTestFile(''' |
+import 'dart:math'; |
+ |
+main() { |
+}'''); |
+ await waitForTasksFinished(); |
+ await _getNavigation(testFile, 0, 1); |
+ expect(regions, hasLength(1)); |
+ assertHasRegionString("'dart:math'"); |
+ expect(testTargets, hasLength(1)); |
+ expect(testTargets[0].kind, ElementKind.LIBRARY); |
+ } |
+ |
+ test_issue24599_importUri() async { |
+ addTestFile(''' |
+import 'dart:math'; |
+ |
+main() { |
+}'''); |
+ await waitForTasksFinished(); |
+ await _getNavigation(testFile, 7, 11); |
+ expect(regions, hasLength(1)); |
+ assertHasRegionString("'dart:math'"); |
+ expect(testTargets, hasLength(1)); |
+ expect(testTargets[0].kind, ElementKind.LIBRARY); |
+ } |
+ |
test_multipleRegions() async { |
addTestFile(''' |
main() { |