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

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

Issue 1299443002: Make generic type of timeout-future the same as the one from the original. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comment. Created 4 years, 10 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_timeout_test.dart
diff --git a/tests/lib/async/future_timeout_test.dart b/tests/lib/async/future_timeout_test.dart
index 8209b8b982c2ab2a4a489cecf33bd25be1dd817f..806b4b4f427b3f19871e93787acf0f122fc6dba5 100644
--- a/tests/lib/async/future_timeout_test.dart
+++ b/tests/lib/async/future_timeout_test.dart
@@ -185,4 +185,14 @@ main() {
expect(s, null);
}));
});
+
+ test("timeoutType", () {
+ Completer completer = new Completer<int>();
+ Future timedOut = completer.future.timeout(
+ const Duration(milliseconds: 5));
+ expect(timedOut, new isInstanceOf<Future<int>>());
+ expect(timedOut, isNot(new isInstanceOf<Future<String>>()));
+ timedOut.catchError((_) {});
+ completer.complete(499);
+ });
}
« 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