1 // run-pass
2 // compile-flags: -C debug_assertions=no
3 // ignore-emscripten dies with an LLVM error
4 
main()5 fn main() {
6     for i in 129..256 {
7         assert_eq!((i as u8).next_power_of_two(), 0);
8     }
9 
10     assert_eq!(((1u16 << 15) + 1).next_power_of_two(), 0);
11     assert_eq!(((1u32 << 31) + 1).next_power_of_two(), 0);
12     assert_eq!(((1u64 << 63) + 1).next_power_of_two(), 0);
13     assert_eq!(((1u128 << 127) + 1).next_power_of_two(), 0);
14 }
15