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

Unified Diff: test/utils.dart

Issue 2515303002: Add expectAsyncX and expectAsyncUntilX methods, and deprecate the old methods. (Closed)
Patch Set: Mark parameter types as Object. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/util/stream_queue_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/utils.dart
diff --git a/test/utils.dart b/test/utils.dart
index 19ac4970583e4cadd040f9ce20869809c9ea4000..74833a4f5177af9a10eee32f3893bb62cd716f00 100644
--- a/test/utils.dart
+++ b/test/utils.dart
@@ -35,7 +35,7 @@ State lastState;
/// The most recent emitted state is stored in [_lastState].
void expectStates(LiveTest liveTest, Iterable<State> statesIter) {
var states = new Queue.from(statesIter);
- liveTest.onStateChange.listen(expectAsync((state) {
+ liveTest.onStateChange.listen(expectAsync1((state) {
lastState = state;
expect(state, equals(states.removeFirst()));
}, count: states.length, max: states.length));
@@ -45,7 +45,7 @@ void expectStates(LiveTest liveTest, Iterable<State> statesIter) {
/// [validators], in order.
void expectErrors(LiveTest liveTest, Iterable<Function> validatorsIter) {
var validators = new Queue.from(validatorsIter);
- liveTest.onError.listen(expectAsync((error) {
+ liveTest.onError.listen(expectAsync1((error) {
validators.removeFirst()(error.error);
}, count: validators.length, max: validators.length));
}
« no previous file with comments | « test/util/stream_queue_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698