use super::dms_hash_log;
#[test]
fn dms_hash_log_does_not_panic_when_matcher_hash_log_below_ten() {
let h = dms_hash_log(128, 7);
assert!(
h <= 7,
"dms hash_log must never exceed the matcher hash_log, got {h}"
);
assert!(
h >= 1,
"dms hash_log must size at least one bucket, got {h}"
);
assert_eq!(dms_hash_log(64, 6), 6);
assert_eq!(dms_hash_log(8, 8), 8);
}
#[test]
fn dms_hash_log_keeps_ten_floor_and_hash_log_cap_when_room_allows() {
assert_eq!(dms_hash_log(64, 22), 10);
assert_eq!(dms_hash_log(1 << 14, 22), 14);
assert_eq!(dms_hash_log(1 << 20, 16), 16);
}