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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 onAnalysisErrors.listen((AnalysisErrorsParams params) { | 145 onAnalysisErrors.listen((AnalysisErrorsParams params) { |
146 currentAnalysisErrors[params.file] = params.errors; | 146 currentAnalysisErrors[params.file] = params.errors; |
147 }); | 147 }); |
148 Completer serverConnected = new Completer(); | 148 Completer serverConnected = new Completer(); |
149 onServerConnected.listen((_) { | 149 onServerConnected.listen((_) { |
150 expect(serverConnected.isCompleted, isFalse); | 150 expect(serverConnected.isCompleted, isFalse); |
151 serverConnected.complete(); | 151 serverConnected.complete(); |
152 }); | 152 }); |
153 onServerError.listen((ServerErrorParams params) { | 153 onServerError.listen((ServerErrorParams params) { |
154 // A server error should never happen during an integration test. | 154 // A server error should never happen during an integration test. |
155 fail(params.message); | 155 fail('${params.message}\n${params.stackTrace}'); |
156 }); | 156 }); |
157 return server.start().then((_) { | 157 return server.start().then((_) { |
158 server.listenToOutput(dispatchNotification); | 158 server.listenToOutput(dispatchNotification); |
159 server.exitCode.then((_) { | 159 server.exitCode.then((_) { |
160 skipShutdown = true; | 160 skipShutdown = true; |
161 }); | 161 }); |
162 return serverConnected.future; | 162 return serverConnected.future; |
163 }); | 163 }); |
164 } | 164 } |
165 | 165 |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 void populateMismatches(item, List<MismatchDescriber> mismatches); | 856 void populateMismatches(item, List<MismatchDescriber> mismatches); |
857 | 857 |
858 /** | 858 /** |
859 * Create a [MismatchDescriber] describing a mismatch with a simple string. | 859 * Create a [MismatchDescriber] describing a mismatch with a simple string. |
860 */ | 860 */ |
861 MismatchDescriber simpleDescription(String description) => | 861 MismatchDescriber simpleDescription(String description) => |
862 (Description mismatchDescription) { | 862 (Description mismatchDescription) { |
863 mismatchDescription.add(description); | 863 mismatchDescription.add(description); |
864 }; | 864 }; |
865 } | 865 } |
OLD | NEW |