diff options
Diffstat (limited to 'vendor/futures/tests/compat.rs')
-rw-r--r-- | vendor/futures/tests/compat.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/futures/tests/compat.rs b/vendor/futures/tests/compat.rs new file mode 100644 index 000000000..c4125d895 --- /dev/null +++ b/vendor/futures/tests/compat.rs @@ -0,0 +1,15 @@ +#![cfg(feature = "compat")] + +use futures::compat::Future01CompatExt; +use futures::prelude::*; +use std::time::Instant; +use tokio::runtime::Runtime; +use tokio::timer::Delay; + +#[test] +fn can_use_01_futures_in_a_03_future_running_on_a_01_executor() { + let f = async { Delay::new(Instant::now()).compat().await }; + + let mut runtime = Runtime::new().unwrap(); + runtime.block_on(f.boxed().compat()).unwrap(); +} |