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

Unified Diff: tests/language/yieldstar_pause_test.dart

Issue 2300993002: Don't make main async in the asyncstar_main_test file. (Closed)
Patch Set: Created 4 years, 3 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/yieldstar_pause_test.dart
diff --git a/tests/language/yieldstar_pause_test.dart b/tests/language/yieldstar_pause_test.dart
index fea834c261ea5a27fbc6d4de35357823d2d66341..945a0ee6c98c93de1f66736943f9990add506618 100644
--- a/tests/language/yieldstar_pause_test.dart
+++ b/tests/language/yieldstar_pause_test.dart
@@ -9,7 +9,7 @@ import "package:async_helper/async_helper.dart";
// Regression test for http://dartbug.com/27205
// If a yield-star completes while the stream is paused, it didn't resume.
-main() async {
+main() {
asyncStart();
var c = new Completer();
var s = yieldStream(mkStream());
@@ -23,8 +23,7 @@ main() async {
c.complete(null);
});
- await c.future;
- asyncEnd();
+ c.future.whenComplete(asyncEnd);
}
Stream yieldStream(Stream s) async* {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698