repo: move `test_id_index()` into a `tests` module
This is the usual convention (to save on compilation time when not
running tests).
@@ -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);
}
+}
