summaryrefslogtreecommitdiffstats
path: root/tokio-test/src/macros.rs
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2019-06-30 08:48:53 -0700
committerGitHub <noreply@github.com>2019-06-30 08:48:53 -0700
commitb2c777846eda2f8d68b3877d0cd5dff77ccde76f (patch)
treea2d5cbe6518a74b89f5587ee9996bdb79f127bb1 /tokio-test/src/macros.rs
parent8e7d8af5886000c20bbe6b6b046bbc1c8256015f (diff)
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
Diffstat (limited to 'tokio-test/src/macros.rs')
-rw-r--r--tokio-test/src/macros.rs33
1 files changed, 4 insertions, 29 deletions
diff --git a/tokio-test/src/macros.rs b/tokio-test/src/macros.rs
index ff3b6eb2..acf5f551 100644
--- a/tokio-test/src/macros.rs
+++ b/tokio-test/src/macros.rs
@@ -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)
- }
- }
- };
-}
-*/
-
-/*
-/// 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);
+ let val = $crate::assert_ready!($e);
+ assert_eq!(val, $expect, $($msg),*)
};
}
-*/