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

Unified Diff: tests/lib_strong/async/stream_subscription_as_future_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/lib_strong/async/stream_subscription_as_future_test.dart
diff --git a/tests/lib_strong/async/stream_subscription_as_future_test.dart b/tests/lib_strong/async/stream_subscription_as_future_test.dart
index 841298b1990339a5440dff21a6bb59d35b4307e8..595f289bc2cf140c876a9d2e5fe7149c57a06d8c 100644
--- a/tests/lib_strong/async/stream_subscription_as_future_test.dart
+++ b/tests/lib_strong/async/stream_subscription_as_future_test.dart
@@ -13,7 +13,9 @@ main() {
test("subscription.asFuture success", () {
Stream stream = new Stream.fromIterable([1, 2, 3]);
var output = [];
- var subscription = stream.listen((x) { output.add(x); });
+ var subscription = stream.listen((x) {
+ output.add(x);
+ });
subscription.asFuture(output).then(expectAsync((o) {
Expect.listEquals([1, 2, 3], o);
}));
@@ -25,7 +27,9 @@ main() {
controller.close();
Stream stream = controller.stream;
var output = [];
- var subscription = stream.listen((x) { output.add(x); });
+ var subscription = stream.listen((x) {
+ output.add(x);
+ });
subscription.asFuture(output).then(expectAsync((o) {
Expect.listEquals([1, 2, 3], o);
}));
@@ -34,7 +38,9 @@ main() {
test("subscription.asFuture success 3", () {
Stream stream = new Stream.fromIterable([1, 2, 3]).map((x) => x);
var output = [];
- var subscription = stream.listen((x) { output.add(x); });
+ var subscription = stream.listen((x) {
+ output.add(x);
+ });
subscription.asFuture(output).then(expectAsync((o) {
Expect.listEquals([1, 2, 3], o);
}));
@@ -44,7 +50,9 @@ main() {
Stream stream = new Stream<int>.fromIterable([1, 2, 3]);
var asyncCallback = expectAsync(() => {});
var output = [];
- var subscription = stream.listen((x) { output.add(x); });
+ var subscription = stream.listen((x) {
+ output.add(x);
+ });
subscription.asFuture("string").then((String o) {
Expect.listEquals([1, 2, 3], output);
Expect.equals("string", o);
@@ -59,20 +67,23 @@ main() {
controller.close();
Stream stream = controller.stream;
var output = [];
- var subscription = stream.listen((x) { output.add(x); });
+ var subscription = stream.listen((x) {
+ output.add(x);
+ });
subscription.asFuture(output).catchError(expectAsync((error) {
Expect.equals(error, "foo");
}));
});
test("subscription.asFuture failure2", () {
- Stream stream = new Stream.fromIterable([1, 2, 3, 4])
- .map((x) {
- if (x == 4) throw "foo";
- return x;
- });
+ Stream stream = new Stream.fromIterable([1, 2, 3, 4]).map((x) {
+ if (x == 4) throw "foo";
+ return x;
+ });
var output = [];
- var subscription = stream.listen((x) { output.add(x); });
+ var subscription = stream.listen((x) {
+ output.add(x);
+ });
subscription.asFuture(output).catchError(expectAsync((error) {
Expect.equals(error, "foo");
}));
@@ -87,7 +98,9 @@ main() {
controller.close();
Stream stream = controller.stream;
var output = [];
- var subscription = stream.listen((x) { output.add(x); });
+ var subscription = stream.listen((x) {
+ output.add(x);
+ });
bool catchErrorHasRun = false;
subscription.asFuture(output).catchError(expectAsync((error) {
Expect.equals(error, "foo");
@@ -109,7 +122,9 @@ main() {
controller.close();
Stream stream = controller.stream;
var output = [];
- var subscription = stream.listen((x) { output.add(x); });
+ var subscription = stream.listen((x) {
+ output.add(x);
+ });
bool catchErrorHasRun = false;
subscription.asFuture(output).catchError(expectAsync((error) {
Expect.equals(error, "foo");

Powered by Google App Engine
This is Rietveld 408576698