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

Unified Diff: pkg/analysis_server/test/edit/sort_members_test.dart

Issue 2473003003: Implement 'Sort Members' for the new analysis driver. (Closed)
Patch Set: Created 4 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/edit/edit_domain.dart ('k') | pkg/analyzer/lib/src/dart/analysis/driver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/edit/sort_members_test.dart
diff --git a/pkg/analysis_server/test/edit/sort_members_test.dart b/pkg/analysis_server/test/edit/sort_members_test.dart
index c5651fa7c074e7e25b7d139247d2dd8aedf3c147..b246d82eca04317d50c529ac5f4777e1298e1637 100644
--- a/pkg/analysis_server/test/edit/sort_members_test.dart
+++ b/pkg/analysis_server/test/edit/sort_members_test.dart
@@ -37,7 +37,7 @@ class SortMembersTest extends AbstractAnalysisTest {
test_BAD_doesNotExist() async {
Request request =
new EditSortMembersParams('/no/such/file.dart').toRequest('0');
- Response response = handler.handleRequest(request);
+ Response response = await waitResponse(request);
expect(response,
isResponseFailure('0', RequestErrorCode.SORT_MEMBERS_INVALID_FILE));
}
@@ -49,7 +49,7 @@ main() {
}
''');
Request request = new EditSortMembersParams(testFile).toRequest('0');
- Response response = handler.handleRequest(request);
+ Response response = await waitResponse(request);
expect(response,
isResponseFailure('0', RequestErrorCode.SORT_MEMBERS_PARSE_ERRORS));
}
@@ -57,7 +57,7 @@ main() {
test_BAD_notDartFile() async {
Request request =
new EditSortMembersParams('/not-a-Dart-file.txt').toRequest('0');
- Response response = handler.handleRequest(request);
+ Response response = await waitResponse(request);
expect(response,
isResponseFailure('0', RequestErrorCode.SORT_MEMBERS_INVALID_FILE));
}
@@ -192,14 +192,14 @@ class C {}
}
Future _assertSorted(String expectedCode) async {
- _requestSort();
+ await _requestSort();
String resultCode = SourceEdit.applySequence(testCode, fileEdit.edits);
expect(resultCode, expectedCode);
}
- void _requestSort() {
+ Future _requestSort() async {
Request request = new EditSortMembersParams(testFile).toRequest('0');
- Response response = handleSuccessfulRequest(request);
+ Response response = await waitResponse(request);
var result = new EditSortMembersResult.fromResponse(response);
fileEdit = result.edit;
}
« no previous file with comments | « pkg/analysis_server/lib/src/edit/edit_domain.dart ('k') | pkg/analyzer/lib/src/dart/analysis/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698