| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 // TODO(nweiz): Add support for calling [schedule] while the schedule is already | 5 // TODO(nweiz): Add support for calling [schedule] while the schedule is already |
| 6 // running. | 6 // running. |
| 7 // TODO(nweiz): Port the non-Pub-specific scheduled test libraries from Pub. | 7 // TODO(nweiz): Port the non-Pub-specific scheduled test libraries from Pub. |
| 8 /// A package for writing readable tests of asynchronous behavior. | 8 /// A package for writing readable tests of asynchronous behavior. |
| 9 /// | 9 /// |
| 10 /// ## Installing ## | 10 /// ## Installing ## |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 /// [pkg]: http://pub.dartlang.org/packages/scheduled_test | 189 /// [pkg]: http://pub.dartlang.org/packages/scheduled_test |
| 190 library scheduled_test; | 190 library scheduled_test; |
| 191 | 191 |
| 192 import 'dart:async'; | 192 import 'dart:async'; |
| 193 | 193 |
| 194 import 'package:stack_trace/stack_trace.dart'; | 194 import 'package:stack_trace/stack_trace.dart'; |
| 195 import 'package:unittest/unittest.dart' as unittest; | 195 import 'package:unittest/unittest.dart' as unittest; |
| 196 | 196 |
| 197 import 'src/schedule.dart'; | 197 import 'src/schedule.dart'; |
| 198 import 'src/schedule_error.dart'; | 198 import 'src/schedule_error.dart'; |
| 199 import 'src/utils.dart'; | |
| 200 | 199 |
| 201 export 'package:unittest/unittest.dart' hide | 200 export 'package:unittest/unittest.dart' hide |
| 202 test, solo_test, group, setUp, tearDown, completes, completion; | 201 test, solo_test, group, setUp, tearDown, completes, completion; |
| 203 | 202 |
| 204 export 'src/schedule.dart'; | 203 export 'src/schedule.dart'; |
| 205 export 'src/schedule_error.dart'; | 204 export 'src/schedule_error.dart'; |
| 206 export 'src/scheduled_future_matchers.dart'; | 205 export 'src/scheduled_future_matchers.dart'; |
| 207 export 'src/task.dart'; | 206 export 'src/task.dart'; |
| 208 | 207 |
| 209 /// The [Schedule] for the current test. This is used to add new tasks and | 208 /// The [Schedule] for the current test. This is used to add new tasks and |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 /// [description] provides an optional description of the future, which is | 379 /// [description] provides an optional description of the future, which is |
| 381 /// used when generating error messages. | 380 /// used when generating error messages. |
| 382 Future wrapFuture(Future future, [String description]) { | 381 Future wrapFuture(Future future, [String description]) { |
| 383 if (currentSchedule == null) { | 382 if (currentSchedule == null) { |
| 384 throw new StateError("Unexpected call to wrapFuture with no current " | 383 throw new StateError("Unexpected call to wrapFuture with no current " |
| 385 "schedule."); | 384 "schedule."); |
| 386 } | 385 } |
| 387 | 386 |
| 388 return currentSchedule.wrapFuture(future, description); | 387 return currentSchedule.wrapFuture(future, description); |
| 389 } | 388 } |
| OLD | NEW |