repo: move test_id_index() into a tests module

This is the usual convention (to save on compilation time when not
running tests).
This commit is contained in:
Martin von Zweigbergk 2023-01-18 15:56:06 -08:00 committed by Martin von Zweigbergk
parent d3789cb28d
commit 0f8622dd5c

View file

@ -1237,6 +1237,10 @@ impl IdIndex {
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_id_index() {
let mut id_index = IdIndex::new();
@ -1260,3 +1264,4 @@ fn test_id_index() {
// If it were there, the length would be 1.
assert_eq!(id_index.shortest_unique_prefix_len(b"c"), 1);
}
}