diff options
Diffstat (limited to 'tests/tick.rs')
-rw-r--r-- | tests/tick.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/tick.rs b/tests/tick.rs index 1273f64..23bbb1f 100644 --- a/tests/tick.rs +++ b/tests/tick.rs @@ -1,5 +1,7 @@ //! Tests for the tick channel flavor. +#![cfg(not(miri))] // TODO: many assertions failed due to Miri is slow + use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; use std::thread; @@ -78,20 +80,20 @@ fn len_empty_full() { let r = tick(ms(50)); assert_eq!(r.len(), 0); - assert_eq!(r.is_empty(), true); - assert_eq!(r.is_full(), false); + assert!(r.is_empty()); + assert!(!r.is_full()); thread::sleep(ms(100)); assert_eq!(r.len(), 1); - assert_eq!(r.is_empty(), false); - assert_eq!(r.is_full(), true); + assert!(!r.is_empty()); + assert!(r.is_full()); r.try_recv().unwrap(); assert_eq!(r.len(), 0); - assert_eq!(r.is_empty(), true); - assert_eq!(r.is_full(), false); + assert!(r.is_empty()); + assert!(!r.is_full()); } #[test] |