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

Unified Diff: tests/lib_strong/async/stream_single_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_single_test.dart
diff --git a/tests/lib_strong/async/stream_single_test.dart b/tests/lib_strong/async/stream_single_test.dart
index 172580b6ab99dd147b56e7e82e6dba536a6ebdb1..79cd6dd5a70041fbed6ebbd08a4ecda05b4dc31f 100644
--- a/tests/lib_strong/async/stream_single_test.dart
+++ b/tests/lib_strong/async/stream_single_test.dart
@@ -14,38 +14,56 @@ main() {
test("single", () {
StreamController c = new StreamController(sync: true);
Future f = c.stream.single;
- f.then(expectAsync((v) { Expect.equals(42, v);}));
+ f.then(expectAsync((v) {
+ Expect.equals(42, v);
+ }));
new Events.fromIterable([42]).replay(c);
});
test("single empty", () {
StreamController c = new StreamController(sync: true);
Future f = c.stream.single;
- f.catchError(expectAsync((error) { Expect.isTrue(error is StateError); }));
+ f.catchError(expectAsync((error) {
+ Expect.isTrue(error is StateError);
+ }));
new Events.fromIterable([]).replay(c);
});
test("single error", () {
StreamController c = new StreamController(sync: true);
Future f = c.stream.single;
- f.catchError(expectAsync((error) { Expect.equals("error", error); }));
- Events errorEvents = new Events()..error("error")..close();
+ f.catchError(expectAsync((error) {
+ Expect.equals("error", error);
+ }));
+ Events errorEvents = new Events()
+ ..error("error")
+ ..close();
errorEvents.replay(c);
});
test("single error 2", () {
StreamController c = new StreamController(sync: true);
Future f = c.stream.single;
- f.catchError(expectAsync((error) { Expect.equals("error", error); }));
- Events errorEvents = new Events()..error("error")..error("error2")..close();
+ f.catchError(expectAsync((error) {
+ Expect.equals("error", error);
+ }));
+ Events errorEvents = new Events()
+ ..error("error")
+ ..error("error2")
+ ..close();
errorEvents.replay(c);
});
test("single error 3", () {
StreamController c = new StreamController(sync: true);
Future f = c.stream.single;
- f.catchError(expectAsync((error) { Expect.equals("error", error); }));
- Events errorEvents = new Events()..add(499)..error("error")..close();
+ f.catchError(expectAsync((error) {
+ Expect.equals("error", error);
+ }));
+ Events errorEvents = new Events()
+ ..add(499)
+ ..error("error")
+ ..close();
errorEvents.replay(c);
});
}

Powered by Google App Engine
This is Rietveld 408576698