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

Unified Diff: pkg/analysis_server/test/services/search/search_engine_test.dart

Issue 2200473002: New test for multiple imports with the same prefix name. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/search/search_engine_test.dart
diff --git a/pkg/analysis_server/test/services/search/search_engine_test.dart b/pkg/analysis_server/test/services/search/search_engine_test.dart
index cea18178960c8a54a8c3399840a0a28f4e430a69..7a9db13d4a0f9a4c4ce981ca57c5f3bfd69f868d 100644
--- a/pkg/analysis_server/test/services/search/search_engine_test.dart
+++ b/pkg/analysis_server/test/services/search/search_engine_test.dart
@@ -461,6 +461,34 @@ math.Random bar() => null;
await _verifyReferences(element, expected);
}
+ test_searchReferences_ImportElement_withPrefix_forMultipleImports() async {
+ _indexTestUnit('''
+import 'dart:async' as p;
+import 'dart:math' as p;
+main() {
+ p.Random;
+ p.Future;
+}
+''');
+ Element mainElement = findElement('main');
+ var kind = MatchKind.REFERENCE;
+ var length = 'p.'.length;
+ {
+ ImportElement element = testLibraryElement.imports[0];
+ var expected = [
+ _expectId(mainElement, kind, 'p.Future;', length: length),
+ ];
+ await _verifyReferences(element, expected);
+ }
+ {
+ ImportElement element = testLibraryElement.imports[1];
+ var expected = [
+ _expectId(mainElement, kind, 'p.Random', length: length),
+ ];
+ await _verifyReferences(element, expected);
+ }
+ }
+
test_searchReferences_LabelElement() async {
_indexTestUnit('''
main() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698