OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library test.integration.analysis; | 5 library test.integration.analysis; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 import 'dart:convert'; | 9 import 'dart:convert'; |
10 import 'dart:io'; | 10 import 'dart:io'; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 if (subscribeStatus) { | 198 if (subscribeStatus) { |
199 futures.add(sendServerSetSubscriptions([ServerService.STATUS])); | 199 futures.add(sendServerSetSubscriptions([ServerService.STATUS])); |
200 } | 200 } |
201 futures.add(sendAnalysisSetAnalysisRoots([sourceDirectory.path], [])); | 201 futures.add(sendAnalysisSetAnalysisRoots([sourceDirectory.path], [])); |
202 return Future.wait(futures); | 202 return Future.wait(futures); |
203 } | 203 } |
204 | 204 |
205 /** | 205 /** |
206 * Start [server]. | 206 * Start [server]. |
207 */ | 207 */ |
208 Future startServer({int servicesPort, bool checked: true}) => | 208 Future startServer( |
209 server.start(servicesPort: servicesPort, checked: checked); | 209 {bool checked: true, int diagnosticPort, int servicesPort}) => |
| 210 server.start( |
| 211 checked: checked, |
| 212 diagnosticPort: diagnosticPort, |
| 213 servicesPort: servicesPort); |
210 | 214 |
211 /** | 215 /** |
212 * After every test, the server is stopped and [sourceDirectory] is deleted. | 216 * After every test, the server is stopped and [sourceDirectory] is deleted. |
213 */ | 217 */ |
214 Future tearDown() { | 218 Future tearDown() { |
215 return shutdownIfNeeded().then((_) { | 219 return shutdownIfNeeded().then((_) { |
216 sourceDirectory.deleteSync(recursive: true); | 220 sourceDirectory.deleteSync(recursive: true); |
217 }); | 221 }); |
218 } | 222 } |
219 | 223 |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 void populateMismatches(item, List<MismatchDescriber> mismatches); | 917 void populateMismatches(item, List<MismatchDescriber> mismatches); |
914 | 918 |
915 /** | 919 /** |
916 * Create a [MismatchDescriber] describing a mismatch with a simple string. | 920 * Create a [MismatchDescriber] describing a mismatch with a simple string. |
917 */ | 921 */ |
918 MismatchDescriber simpleDescription(String description) => | 922 MismatchDescriber simpleDescription(String description) => |
919 (Description mismatchDescription) { | 923 (Description mismatchDescription) { |
920 mismatchDescription.add(description); | 924 mismatchDescription.add(description); |
921 }; | 925 }; |
922 } | 926 } |
OLD | NEW |