5 use test::black_box as b; // prevent promotion of the argument and const-propagation of the result
7 const BE_U32: u32 = 55u32.to_be();
8 const LE_U32: u32 = 55u32.to_le();
11 assert_eq!(BE_U32, b(55u32).to_be());
12 assert_eq!(LE_U32, b(55u32).to_le());
14 #[cfg(not(target_os = "emscripten"))]
16 const BE_U128: u128 = 999999u128.to_be();
17 const LE_I128: i128 = (-999999i128).to_le();
18 assert_eq!(BE_U128, b(999999u128).to_be());
19 assert_eq!(LE_I128, b(-999999i128).to_le());