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 ce4e6fac8fd2c056cb63b88abc8fc9242a5c15c1..b52f81baab5acd665d1aaf023a18c33e4fa114da 100644 |
--- a/pkg/analysis_server/test/services/search/search_engine_test.dart |
+++ b/pkg/analysis_server/test/services/search/search_engine_test.dart |
@@ -367,6 +367,26 @@ main() { |
return _verifyReferences(element, expected); |
} |
+ Future test_searchReferences_LabelElement() { |
+ _indexTestUnit(''' |
+main() { |
+label: |
+ while (true) { |
+ if (true) { |
+ break label; // 1 |
+ } |
+ break label; // 2 |
+ } |
+} |
+'''); |
+ LabelElement element = findElement('label'); |
+ Element mainElement = findElement('main'); |
+ var expected = [ |
+ _expectId(mainElement, MatchKind.REFERENCE, 'label; // 1'), |
+ _expectId(mainElement, MatchKind.REFERENCE, 'label; // 2')]; |
+ return _verifyReferences(element, expected); |
+ } |
+ |
Future test_searchReferences_LibraryElement() { |
var codeA = 'part of lib; // A'; |
var codeB = 'part of lib; // B'; |
@@ -416,43 +436,6 @@ main() { |
return _verifyReferences(element, expected); |
} |
- Future test_searchReferences_LabelElement() { |
- _indexTestUnit(''' |
-main() { |
-label: |
- while (true) { |
- if (true) { |
- break label; // 1 |
- } |
- break label; // 2 |
- } |
-} |
-'''); |
- LabelElement element = findElement('label'); |
- Element mainElement = findElement('main'); |
- var expected = [ |
- _expectId(mainElement, MatchKind.REFERENCE, 'label; // 1'), |
- _expectId(mainElement, MatchKind.REFERENCE, 'label; // 2')]; |
- return _verifyReferences(element, expected); |
- } |
- |
- Future test_searchReferences_PrefixElement() { |
- _indexTestUnit(''' |
-import 'dart:async' as ppp; |
-main() { |
- ppp.Future a; |
- ppp.Stream b; |
-} |
-'''); |
- PrefixElement element = findNodeElementAtString('ppp;'); |
- Element elementA = findElement('a'); |
- Element elementB = findElement('b'); |
- var expected = [ |
- _expectId(elementA, MatchKind.REFERENCE, 'ppp.Future'), |
- _expectId(elementB, MatchKind.REFERENCE, 'ppp.Stream')]; |
- return _verifyReferences(element, expected); |
- } |
- |
Future test_searchReferences_MethodElement() { |
_indexTestUnit(''' |
class A { |
@@ -515,6 +498,23 @@ main() { |
return _verifyReferences(element, expected); |
} |
+ Future test_searchReferences_PrefixElement() { |
+ _indexTestUnit(''' |
+import 'dart:async' as ppp; |
+main() { |
+ ppp.Future a; |
+ ppp.Stream b; |
+} |
+'''); |
+ PrefixElement element = findNodeElementAtString('ppp;'); |
+ Element elementA = findElement('a'); |
+ Element elementB = findElement('b'); |
+ var expected = [ |
+ _expectId(elementA, MatchKind.REFERENCE, 'ppp.Future'), |
+ _expectId(elementB, MatchKind.REFERENCE, 'ppp.Stream')]; |
+ return _verifyReferences(element, expected); |
+ } |
+ |
Future test_searchReferences_PropertyAccessorElement_getter() { |
_indexTestUnit(''' |
class A { |