MCPcopy Create free account
hub / github.com/RustCrypto/utils / zero_counts_u64

Function zero_counts_u64

ctutils/src/primitives.rs:365–372  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

363
364 #[test]
365 fn zero_counts_u64() {
366 for bit in 0..u64::BITS {
367 for value in [0, 1 << bit, !(1 << bit), u64::MAX >> bit] {
368 assert_eq!(leading_zeros_u64(value), value.leading_zeros());
369 assert_eq!(trailing_zeros_u64(value), value.trailing_zeros());
370 }
371 }
372 }
373
374 macro_rules! subtraction_tests {
375 ($test:ident, $ty:ty, $sub:ident, $sub_mask:ident) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected