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

Unified Diff: pkg/analysis_server/test/domain_analysis_test.dart

Issue 482573004: Change analysis server protocol to omit empty lists when optional. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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
Index: pkg/analysis_server/test/domain_analysis_test.dart
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart
index e38ec71655f79e7dbe2939a06d69fbc4bc568d99..43997edaf21af9410f25637473e76009ea9f6545 100644
--- a/pkg/analysis_server/test/domain_analysis_test.dart
+++ b/pkg/analysis_server/test/domain_analysis_test.dart
@@ -50,8 +50,8 @@ main() {
group('setAnalysisRoots', () {
Response testSetAnalysisRoots(List<String> included,
List<String> excluded) {
- Request request = new AnalysisSetAnalysisRootsParams(included,
- excluded).toRequest('0');
+ Request request = new AnalysisSetAnalysisRootsParams(included: included,
+ excluded: excluded).toRequest('0');
return handler.handleRequest(request);
}
@@ -98,7 +98,7 @@ main() {
// TODO(paulberry): under the "eventual consistency" model this request
// should not be invalid.
var request = new AnalysisSetPriorityFilesParams(
- ['/project/lib.dart']).toRequest('0');
+ files: ['/project/lib.dart']).toRequest('0');
var response = handler.handleRequest(request);
expect(response, isResponseFailure('0'));
});
@@ -111,13 +111,13 @@ main() {
resourceProvider.newFile('/p2/c.dart', 'library c;');
var setRootsRequest = new AnalysisSetAnalysisRootsParams(
- ['/p1', '/p2'], []).toRequest('0');
+ included: ['/p1', '/p2']).toRequest('0');
var setRootsResponse = handler.handleRequest(setRootsRequest);
expect(setRootsResponse, isResponseSuccess('0'));
void setPriorityFiles(List<String> fileList) {
var request = new AnalysisSetPriorityFilesParams(
- fileList).toRequest('0');
+ files: fileList).toRequest('0');
var response = handler.handleRequest(request);
expect(response, isResponseSuccess('0'));
// TODO(brianwilkerson) Enable the line below after getPriorityFiles
@@ -211,7 +211,7 @@ testUpdateContent() {
// Add the file to the cache
helper.sendContentChange(new AddContentOverlay(initialContent));
// update code
- helper.sendContentChange(new ChangeContentOverlay([
+ helper.sendContentChange(new ChangeContentOverlay(edits: [
new SourceEdit('library '.length, 'A;'.length, 'lib')]));
// wait, there is an error
return helper.waitForOperationsFinished().then((_) {
@@ -483,8 +483,8 @@ class AnalysisTestHelper {
*/
void createEmptyProject() {
resourceProvider.newFolder('/project');
- Request request = new AnalysisSetAnalysisRootsParams(['/project'],
- []).toRequest('0');
+ Request request = new AnalysisSetAnalysisRootsParams(
+ included: ['/project']).toRequest('0');
handleSuccessfulRequest(request);
}
@@ -496,8 +496,8 @@ class AnalysisTestHelper {
this.testCode = _getCodeString(code);
resourceProvider.newFolder('/project');
resourceProvider.newFile(testFile, testCode);
- Request request = new AnalysisSetAnalysisRootsParams(['/project'],
- []).toRequest('0');
+ Request request = new AnalysisSetAnalysisRootsParams(
+ included: ['/project']).toRequest('0');
handleSuccessfulRequest(request);
}

Powered by Google App Engine
This is Rietveld 408576698