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

Unified Diff: tests/lib/async/futures_test.dart

Issue 14070010: Refactor Future constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added co19 issue number. Created 7 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
« no previous file with comments | « tests/lib/async/future_test.dart ('k') | tests/lib/async/slow_consumer2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/futures_test.dart
diff --git a/tests/lib/async/futures_test.dart b/tests/lib/async/futures_test.dart
index 9dc9b1c26998fdf1b44a32d581d78ba5f7362053..446d93b17fe2f2403fadd76a249ff6c779247eda 100644
--- a/tests/lib/async/futures_test.dart
+++ b/tests/lib/async/futures_test.dart
@@ -84,7 +84,7 @@ Future testForEach() {
var seen = <int>[];
return Future.forEach([1, 2, 3, 4, 5], (n) {
seen.add(n);
- return new Future.immediate(null);
+ return new Future.value();
}).then((_) => Expect.listEquals([1, 2, 3, 4, 5], seen));
}
@@ -93,7 +93,7 @@ Future testForEachWithException() {
return Future.forEach([1, 2, 3, 4, 5], (n) {
if (n == 4) throw 'correct exception';
seen.add(n);
- return new Future.immediate(null);
+ return new Future.value();
}).then((_) {
throw 'incorrect exception';
}).catchError((error) {
« no previous file with comments | « tests/lib/async/future_test.dart ('k') | tests/lib/async/slow_consumer2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698