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

Side by Side Diff: lib/src/runner/vm/isolate_test.dart

Issue 1044953004: Gracefully handle tests that print. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « lib/src/runner/vm/isolate_listener.dart ('k') | test/backend/invoker_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 unittest.runner.vm.isolate_test; 5 library unittest.runner.vm.isolate_test;
6 6
7 import 'dart:isolate'; 7 import 'dart:isolate';
8 8
9 import '../../backend/live_test.dart'; 9 import '../../backend/live_test.dart';
10 import '../../backend/live_test_controller.dart'; 10 import '../../backend/live_test_controller.dart';
(...skipping 28 matching lines...) Expand all
39 39
40 receivePort.listen((message) { 40 receivePort.listen((message) {
41 if (message['type'] == 'error') { 41 if (message['type'] == 'error') {
42 var asyncError = RemoteException.deserialize(message['error']); 42 var asyncError = RemoteException.deserialize(message['error']);
43 controller.addError(asyncError.error, asyncError.stackTrace); 43 controller.addError(asyncError.error, asyncError.stackTrace);
44 } else if (message['type'] == 'state-change') { 44 } else if (message['type'] == 'state-change') {
45 controller.setState( 45 controller.setState(
46 new State( 46 new State(
47 new Status.parse(message['status']), 47 new Status.parse(message['status']),
48 new Result.parse(message['result']))); 48 new Result.parse(message['result'])));
49 } else if (message['type'] == 'print') {
50 controller.print(message['line']);
49 } else { 51 } else {
50 assert(message['type'] == 'complete'); 52 assert(message['type'] == 'complete');
51 controller.completer.complete(); 53 controller.completer.complete();
52 } 54 }
53 }); 55 });
54 }, onClose: () { 56 }, onClose: () {
55 if (receivePort != null) receivePort.close(); 57 if (receivePort != null) receivePort.close();
56 }); 58 });
57 return controller.liveTest; 59 return controller.liveTest;
58 } 60 }
59 } 61 }
OLDNEW
« no previous file with comments | « lib/src/runner/vm/isolate_listener.dart ('k') | test/backend/invoker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698