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

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

Issue 23793006: Handle Future result from Future.sync computation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits from floitsch Created 7 years, 3 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 | « sdk/lib/async/future_impl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/future_test.dart
diff --git a/tests/lib/async/future_test.dart b/tests/lib/async/future_test.dart
index 15948322ea8dce4cd9023e300255ce5a1dd5253c..5fa450c34b86a912ed1f7b96fdec374869f14ced 100644
--- a/tests/lib/async/future_test.dart
+++ b/tests/lib/async/future_test.dart
@@ -617,6 +617,19 @@ void testChainedFutureError() {
completer.complete(21);
}
+void testSyncFuture_i13368() {
+ asyncStart();
+
+ final future = new Future<int>.sync(() {
+ return new Future<int>.value(42);
+ });
+
+ future.then((int val) {
+ Expect.equals(val, 42);
+ asyncEnd();
+ });
+}
+
main() {
testValue();
testSync();
@@ -658,4 +671,6 @@ main() {
testChainedFutureValue();
testChainedFutureValueDelay();
testChainedFutureError();
+
+ testSyncFuture_i13368();
}
« no previous file with comments | « sdk/lib/async/future_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698