From 3b7a775f38063f6324b116b10414fe581c74f3f4 Mon Sep 17 00:00:00 2001 From: Yoan Lecoq Date: Sun, 30 Apr 2017 10:45:51 +0200 Subject: [PATCH] Remove Signed Wrapping test because Wrapping doesn't impl Neg in Rust 1.8 --- traits/src/sign.rs | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/traits/src/sign.rs b/traits/src/sign.rs index 2912782..ba06edc 100644 --- a/traits/src/sign.rs +++ b/traits/src/sign.rs @@ -187,27 +187,3 @@ empty_trait_impl!(Unsigned for usize u8 u16 u32 u64); impl Unsigned for Wrapping where Wrapping: Num {} - -macro_rules! test_signed_wrapping { - ($($t:ty)+) => { - $({ - let range = -1 as $t .. 2 as $t; - for i in range.clone() { - let w = Wrapping(i); - assert_eq!(signum(i), signum(w).0); - assert_eq!(abs(i), abs(w).0); - for j in range.clone() { - assert_eq!(abs_sub(i, j), abs_sub(w, Wrapping(j)).0); - } - assert_eq!(i.is_positive(), w.is_positive()); - assert_eq!(i.is_negative(), w.is_negative()); - } - })+ - }; -} - -#[test] -fn signed_wrapping() { - test_signed_wrapping!(isize i8 i16 i32 i64); -} -