OLD | NEW |
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.backend.live_test; | 5 library unittest.backend.live_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'state.dart'; | 9 import 'state.dart'; |
10 import 'suite.dart'; | 10 import 'suite.dart'; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 List<AsyncError> get errors; | 72 List<AsyncError> get errors; |
73 | 73 |
74 /// A stream that emits a new [AsyncError] whenever an error is caught. | 74 /// A stream that emits a new [AsyncError] whenever an error is caught. |
75 /// | 75 /// |
76 /// This will be emit an event after [errors] is updated. These errors are not | 76 /// This will be emit an event after [errors] is updated. These errors are not |
77 /// guaranteed to have the same types as when they were thrown; for example, | 77 /// guaranteed to have the same types as when they were thrown; for example, |
78 /// they may need to be serialized across isolate boundaries. The stack traces | 78 /// they may need to be serialized across isolate boundaries. The stack traces |
79 /// will be [Chain]s. | 79 /// will be [Chain]s. |
80 Stream<AsyncError> get onError; | 80 Stream<AsyncError> get onError; |
81 | 81 |
| 82 /// A stream that emits lines printed by the test. |
| 83 Stream<String> onPrint; |
| 84 |
82 /// A [Future] that completes once the test is complete. | 85 /// A [Future] that completes once the test is complete. |
83 /// | 86 /// |
84 /// This will complete after [onStateChange] has fired, and after [onError] | 87 /// This will complete after [onStateChange] has fired, and after [onError] |
85 /// has fired if the test completes because of an error. It's the same as the | 88 /// has fired if the test completes because of an error. It's the same as the |
86 /// [Future] returned by [run]. | 89 /// [Future] returned by [run]. |
87 /// | 90 /// |
88 /// Note that even once this completes, the test may still be running code | 91 /// Note that even once this completes, the test may still be running code |
89 /// asynchronously. A test is considered complete either once it hits its | 92 /// asynchronously. A test is considered complete either once it hits its |
90 /// first error or when all [expectAsync] callbacks have been called and any | 93 /// first error or when all [expectAsync] callbacks have been called and any |
91 /// returned [Future] has completed, but it's possible for further processing | 94 /// returned [Future] has completed, but it's possible for further processing |
(...skipping 16 matching lines...) Expand all Loading... |
108 /// Once [close] is called, [onComplete] will complete if it hasn't already | 111 /// Once [close] is called, [onComplete] will complete if it hasn't already |
109 /// and [onStateChange] and [onError] will close immediately. This means that, | 112 /// and [onStateChange] and [onError] will close immediately. This means that, |
110 /// if the test was running at the time [close] is called, it will never emit | 113 /// if the test was running at the time [close] is called, it will never emit |
111 /// a [Status.complete] state-change event. | 114 /// a [Status.complete] state-change event. |
112 /// | 115 /// |
113 /// This doesn't automatically happen after the test completes because there | 116 /// This doesn't automatically happen after the test completes because there |
114 /// may be more asynchronous work going on in the background that could | 117 /// may be more asynchronous work going on in the background that could |
115 /// produce new errors. | 118 /// produce new errors. |
116 Future close(); | 119 Future close(); |
117 } | 120 } |
OLD | NEW |