Files
tokio/tokio-executor/tests/enter.rs
T

18 lines
347 B
Rust
Raw Normal View History

#![warn(rust_2018_idioms)]
2019-06-24 12:34:30 -07:00
#[test]
fn block_on_ready() {
let mut enter = tokio_executor::enter().unwrap();
let val = enter.block_on(async { 123 });
assert_eq!(val, 123);
}
#[test]
fn block_on_pending() {
let mut enter = tokio_executor::enter().unwrap();
let val = enter.block_on(async { 123 });
assert_eq!(val, 123);
}