| 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.expect_async; | 5 library unittest.frontend.expect_async; |
| 6 | 6 |
| 7 import '../backend/invoker.dart'; |
| 8 import '../backend/state.dart'; |
| 7 import 'expect.dart'; | 9 import 'expect.dart'; |
| 8 import 'invoker.dart'; | |
| 9 import 'state.dart'; | |
| 10 | 10 |
| 11 /// An object used to detect unpassed arguments. | 11 /// An object used to detect unpassed arguments. |
| 12 const _PLACEHOLDER = const Object(); | 12 const _PLACEHOLDER = const Object(); |
| 13 | 13 |
| 14 // Functions used to check how many arguments a callback takes. | 14 // Functions used to check how many arguments a callback takes. |
| 15 typedef _Func0(); | 15 typedef _Func0(); |
| 16 typedef _Func1(a); | 16 typedef _Func1(a); |
| 17 typedef _Func2(a, b); | 17 typedef _Func2(a, b); |
| 18 typedef _Func3(a, b, c); | 18 typedef _Func3(a, b, c); |
| 19 typedef _Func4(a, b, c, d); | 19 typedef _Func4(a, b, c, d); |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 /// true will the callback be considered complete. [callback] may take up to six | 225 /// true will the callback be considered complete. [callback] may take up to six |
| 226 /// optional or required positional arguments; named arguments are not | 226 /// optional or required positional arguments; named arguments are not |
| 227 /// supported. | 227 /// supported. |
| 228 /// | 228 /// |
| 229 /// Both [id] and [reason] are optional and provide extra information about the | 229 /// Both [id] and [reason] are optional and provide extra information about the |
| 230 /// callback when debugging. [id] should be the name of the callback, while | 230 /// callback when debugging. [id] should be the name of the callback, while |
| 231 /// [reason] should be the reason the callback is expected to be called. | 231 /// [reason] should be the reason the callback is expected to be called. |
| 232 Function expectAsyncUntil(Function callback, bool isDone(), | 232 Function expectAsyncUntil(Function callback, bool isDone(), |
| 233 {String id, String reason}) => new _ExpectedFunction(callback, 0, -1, | 233 {String id, String reason}) => new _ExpectedFunction(callback, 0, -1, |
| 234 id: id, reason: reason, isDone: isDone).func; | 234 id: id, reason: reason, isDone: isDone).func; |
| OLD | NEW |