|
@@ -93,8 +93,20 @@ fn wrapping_bounded() {
|
|
|
}
|
|
|
|
|
|
test_wrapping_bounded!(usize u8 u16 u32 u64 isize i8 i16 i32 i64);
|
|
|
+}
|
|
|
+
|
|
|
+#[cfg(feature = "i128")]
|
|
|
+#[test]
|
|
|
+fn wrapping_bounded_i128() {
|
|
|
+ macro_rules! test_wrapping_bounded {
|
|
|
+ ($($t:ty)+) => {
|
|
|
+ $(
|
|
|
+ assert_eq!(Wrapping::<$t>::min_value().0, <$t>::min_value());
|
|
|
+ assert_eq!(Wrapping::<$t>::max_value().0, <$t>::max_value());
|
|
|
+ )+
|
|
|
+ };
|
|
|
+ }
|
|
|
|
|
|
- #[cfg(feature = "i128")]
|
|
|
test_wrapping_bounded!(u128 i128);
|
|
|
}
|
|
|
|