2 #![allow(overflowing_literals)]
6 ($m:ident, $t:ty, $v:expr) => {{
9 #[derive(Copy, Clone, Debug)]
16 assert_eq!(size_of::<E>(), size_of::<$t>());
17 assert_eq!(E::V as $t, $v as $t);
18 assert_eq!(C as $t, $v as $t);
19 assert_eq!(format!("{:?}", E::V), "V".to_string());
20 assert_eq!(format!("{:?}", C), "V".to_string());
30 check!(c, u16, 0x1727);
31 check!(d, u16, 0xe8d8);
32 check!(e, u32, 0x17273747);
33 check!(f, u32, 0xe8d8c8b8);
37 check!(x, i16, 0x1727);
38 check!(w, i16, -0x1727);
39 check!(v, i32, 0x17273747);
40 check!(u, i32, -0x17273747);
43 assert_eq!(::std::mem::size_of::<Simple>(), 1);