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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 'id': id, | 575 'id': id, |
576 'method': method | 576 'method': method |
577 }; | 577 }; |
578 if (params != null) { | 578 if (params != null) { |
579 command['params'] = params; | 579 command['params'] = params; |
580 } | 580 } |
581 Completer completer = new Completer(); | 581 Completer completer = new Completer(); |
582 _pendingCommands[id] = completer; | 582 _pendingCommands[id] = completer; |
583 String line = JSON.encode(command); | 583 String line = JSON.encode(command); |
584 _recordStdio('SEND: $line'); | 584 _recordStdio('SEND: $line'); |
585 _process.stdin.add(UTF8.encoder.convert("${line}\n")); | 585 _process.stdin.add(UTF8.encoder.convert("$line\n")); |
586 return completer.future; | 586 return completer.future; |
587 } | 587 } |
588 | 588 |
589 /** | 589 /** |
590 * Start the server. If [debugServer] is `true`, the server will be started | 590 * Start the server. If [debugServer] is `true`, the server will be started |
591 * with "--debug", allowing a debugger to be attached. If [profileServer] is | 591 * with "--debug", allowing a debugger to be attached. If [profileServer] is |
592 * `true`, the server will be started with "--observe" and | 592 * `true`, the server will be started with "--observe" and |
593 * "--pause-isolates-on-exit", allowing the observatory to be used. | 593 * "--pause-isolates-on-exit", allowing the observatory to be used. |
594 */ | 594 */ |
595 Future start( | 595 Future start( |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 void populateMismatches(item, List<MismatchDescriber> mismatches); | 883 void populateMismatches(item, List<MismatchDescriber> mismatches); |
884 | 884 |
885 /** | 885 /** |
886 * Create a [MismatchDescriber] describing a mismatch with a simple string. | 886 * Create a [MismatchDescriber] describing a mismatch with a simple string. |
887 */ | 887 */ |
888 MismatchDescriber simpleDescription(String description) => | 888 MismatchDescriber simpleDescription(String description) => |
889 (Description mismatchDescription) { | 889 (Description mismatchDescription) { |
890 mismatchDescription.add(description); | 890 mismatchDescription.add(description); |
891 }; | 891 }; |
892 } | 892 } |
OLD | NEW |