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

Unified Diff: tests/language_strong/asyncstar_yieldstar_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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
Index: tests/language_strong/asyncstar_yieldstar_test.dart
diff --git a/tests/language_strong/asyncstar_yieldstar_test.dart b/tests/language_strong/asyncstar_yieldstar_test.dart
index 4caaf2d03216f1b5a750d1a4ba2049c3a187f826..55130d745efe44dae20720ec4e44d29b8f60381a 100644
--- a/tests/language_strong/asyncstar_yieldstar_test.dart
+++ b/tests/language_strong/asyncstar_yieldstar_test.dart
@@ -8,7 +8,7 @@ import "package:async_helper/async_helper.dart";
Stream<int> subStream(p) async* {
yield p;
- yield p+1;
+ yield p + 1;
}
Stream foo(Completer<bool> finalized) async* {
@@ -32,24 +32,23 @@ foo2(Stream subStream) async* {
}
test() async {
- Expect.listEquals([0, 1],
- await (subStream(0).toList()));
+ Expect.listEquals([0, 1], await (subStream(0).toList()));
Completer<bool> finalized = new Completer<bool>();
Expect.listEquals(["outer", 0, 1, "outer", 1, 2, "outer", 2],
await (foo(finalized).take(8).toList()));
Expect.isTrue(await (finalized.future));
-
+
finalized = new Completer<bool>();
// Canceling the stream while it is yield*-ing from the sub-stream.
Expect.listEquals(["outer", 0, 1, "outer", 1, 2, "outer"],
await (foo(finalized).take(7).toList()));
Expect.isTrue(await (finalized.future));
finalized = new Completer<bool>();
-
+
Completer<bool> pausedCompleter = new Completer<bool>();
Completer<bool> resumedCompleter = new Completer<bool>();
Completer<bool> canceledCompleter = new Completer<bool>();
-
+
StreamController controller;
int i = 0;
addNext() {
@@ -60,7 +59,7 @@ test() async {
scheduleMicrotask(addNext);
}
}
-
+
controller = new StreamController(onListen: () {
scheduleMicrotask(addNext);
}, onPause: () {
@@ -71,7 +70,7 @@ test() async {
}, onCancel: () {
canceledCompleter.complete(true);
});
-
+
StreamSubscription subscription;
// Test that the yield*'ed stream is paused and resumed.
subscription = foo2(controller.stream).listen((event) {
@@ -97,4 +96,4 @@ main() {
test().then((_) {
asyncEnd();
});
-}
+}

Powered by Google App Engine
This is Rietveld 408576698