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); |
+ }); |
} |