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

Unified Diff: test/backend/invoker_test.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/backend/declarer_test.dart ('k') | test/frontend/expect_async_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/backend/invoker_test.dart
diff --git a/test/backend/invoker_test.dart b/test/backend/invoker_test.dart
index f31ac50a2b1d4eb150cd07fc9f529147571f5538..4989fd9cbdb8cb3bceaf44143b2ec40f1d0901cb 100644
--- a/test/backend/invoker_test.dart
+++ b/test/backend/invoker_test.dart
@@ -33,7 +33,7 @@ void main() {
var liveTest = _localTest(() {
invoker = Invoker.current;
}).load(suite);
- liveTest.onError.listen(expectAsync((_) {}, count: 0));
+ liveTest.onError.listen(expectAsync1((_) {}, count: 0));
await liveTest.run();
expect(invoker.liveTest, equals(liveTest));
@@ -51,7 +51,7 @@ void main() {
completer.complete(Invoker.current);
});
}).load(suite);
- liveTest.onError.listen(expectAsync((_) {}, count: 0));
+ liveTest.onError.listen(expectAsync1((_) {}, count: 0));
expect(liveTest.run(), completes);
var invoker = await completer.future;
@@ -67,7 +67,7 @@ void main() {
liveTest = _localTest(() {
stateInTest = liveTest.state;
}).load(suite);
- liveTest.onError.listen(expectAsync((_) {}, count: 0));
+ liveTest.onError.listen(expectAsync1((_) {}, count: 0));
expect(liveTest.state.status, equals(Status.pending));
expect(liveTest.state.result, equals(Result.success));
@@ -88,10 +88,10 @@ void main() {
test("onStateChange fires for each state change", () {
var liveTest = _localTest(() {}).load(suite);
- liveTest.onError.listen(expectAsync((_) {}, count: 0));
+ liveTest.onError.listen(expectAsync1((_) {}, count: 0));
var first = true;
- liveTest.onStateChange.listen(expectAsync((state) {
+ liveTest.onStateChange.listen(expectAsync1((state) {
if (first) {
expect(state.status, equals(Status.running));
first = false;
@@ -368,7 +368,7 @@ void main() {
});
}).load(suite);
- liveTest.onError.listen(expectAsync((_) {}, count: 0));
+ liveTest.onError.listen(expectAsync1((_) {}, count: 0));
await liveTest.run();
expect(outstandingCallbackRemoved, isTrue);
@@ -488,7 +488,7 @@ void main() {
() async {
var callbackRun = false;
await Invoker.current.waitForOutstandingCallbacks(() {
- pumpEventQueue().then(expectAsync((_) {
+ pumpEventQueue().then(expectAsync1((_) {
callbackRun = true;
}));
});
« no previous file with comments | « test/backend/declarer_test.dart ('k') | test/frontend/expect_async_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698