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

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

Issue 725143004: Format and sort analyzer and analysis_server packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
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 {
« no previous file with comments | « pkg/analysis_server/test/services/search/hierarchy_test.dart ('k') | pkg/analysis_server/test/socket_server_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698