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

Unified Diff: tests/lib_strong/async/futures_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/futures_test.dart
diff --git a/tests/lib_strong/async/futures_test.dart b/tests/lib_strong/async/futures_test.dart
index 6d6037216719ce8f0dbf952963710aa036a9e0f3..a9a37e0df3246392a75b586ae123f54ba9fc8f3f 100644
--- a/tests/lib_strong/async/futures_test.dart
+++ b/tests/lib_strong/async/futures_test.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
library futures_test;
+
import 'package:async_helper/async_helper.dart';
import "package:expect/expect.dart";
import 'dart:async';
@@ -96,7 +97,7 @@ Future testWaitWithMultipleErrorsEager() {
StackTrace get currentStackTrace {
try {
throw 0;
- } catch(e, st) {
+ } catch (e, st) {
return st;
}
return null;
@@ -155,17 +156,22 @@ Future testWaitWithMultipleErrorsWithStackTraceEager() {
Future testEagerWait() {
var st;
- try { throw 0; } catch (e, s) { st = s; }
+ try {
+ throw 0;
+ } catch (e, s) {
+ st = s;
+ }
Completer c1 = new Completer();
Completer c2 = new Completer();
List<Future> futures = <Future>[c1.future, c2.future];
Future waited = Future.wait(futures, eagerError: true);
- var result = waited.then((v) { throw "should not be called"; },
- onError: (e, s) {
- Expect.equals(e, 42);
- Expect.identical(st, s);
- return true;
- });
+ var result = waited.then((v) {
+ throw "should not be called";
+ }, onError: (e, s) {
+ Expect.equals(e, 42);
+ Expect.identical(st, s);
+ return true;
+ });
c1.completeError(42, st);
return result;
}
@@ -186,8 +192,8 @@ Future testForEach() {
Future testForEachSync() {
var seen = <int>[];
- return Future.forEach([1, 2, 3, 4, 5], seen.add)
- .then((_) => Expect.listEquals([1, 2, 3, 4, 5], seen));
+ return Future.forEach([1, 2, 3, 4, 5], seen.add).then(
+ (_) => Expect.listEquals([1, 2, 3, 4, 5], seen));
}
Future testForEachWithException() {

Powered by Google App Engine
This is Rietveld 408576698