mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-26 00:00:16 +02:00
timer: finish updating timer (#1222)
* timer: restructure feature flags * update timer tests * Add `async-traits` to CI This also disables a buggy `threadpool` test. This test should be fixed in the future. Refs #1225
This commit is contained in:
@@ -74,41 +74,16 @@ macro_rules! assert_pending {
|
||||
}};
|
||||
}
|
||||
|
||||
/*
|
||||
/// Assert if a poll is ready and check for equality on the value
|
||||
#[macro_export]
|
||||
macro_rules! assert_ready_eq {
|
||||
($e:expr, $expect:expr) => {
|
||||
use $crate::codegen::futures::Async::Ready;
|
||||
match $e {
|
||||
Ok(e) => assert_eq!(e, Ready($expect)),
|
||||
Err(e) => panic!("error = {:?}", e),
|
||||
}
|
||||
let val = $crate::assert_ready!($e);
|
||||
assert_eq!(val, $expect)
|
||||
};
|
||||
|
||||
($e:expr, $expect:expr, $($msg:tt),+) => {
|
||||
use $crate::codegen::futures::Async::Ready;
|
||||
match $e {
|
||||
Ok(e) => assert_eq!(e, Ready($expect), $($msg)+),
|
||||
Err(e) => {
|
||||
let msg = format_args!($($msg),+);
|
||||
panic!("error = {:?}; {}", e, msg)
|
||||
}
|
||||
}
|
||||
let val = $crate::assert_ready!($e);
|
||||
assert_eq!(val, $expect, $($msg),*)
|
||||
};
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
/// Assert if the deadline has passed
|
||||
#[macro_export]
|
||||
macro_rules! assert_elapsed {
|
||||
($e:expr) => {
|
||||
assert!($e.unwrap_err().is_elapsed());
|
||||
};
|
||||
|
||||
($e:expr, $($msg:expr),+) => {
|
||||
assert!($e.unwrap_err().is_elapsed(), $msg);
|
||||
};
|
||||
}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user