| 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.live_test; | 5 library unittest.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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 /// Signals that this test should start running as soon as possible. | 95 /// Signals that this test should start running as soon as possible. |
| 96 /// | 96 /// |
| 97 /// A test may not start running immediately for various reasons specific to | 97 /// A test may not start running immediately for various reasons specific to |
| 98 /// the means by which it's defined. Until it starts running, [state] will | 98 /// the means by which it's defined. Until it starts running, [state] will |
| 99 /// continue to be marked [Status.pending]. | 99 /// continue to be marked [Status.pending]. |
| 100 /// | 100 /// |
| 101 /// This returns the same [Future] as [onComplete]. It may not be called more | 101 /// This returns the same [Future] as [onComplete]. It may not be called more |
| 102 /// than once. | 102 /// than once. |
| 103 Future run(); | 103 Future run(); |
| 104 |
| 105 /// Signals that this test should stop emitting events and release any |
| 106 /// resources it may have allocated. |
| 107 /// |
| 108 /// Once [close] is called, [onComplete] will complete if it hasn't already |
| 109 /// 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 |
| 111 /// a [Status.complete] state-change event. |
| 112 /// |
| 113 /// This doesn't automatically happen after the test completes because there |
| 114 /// may be more asynchronous work going on in the background that could |
| 115 /// produce new errors. |
| 116 Future close(); |
| 104 } | 117 } |
| OLD | NEW |