mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-18 02:04:19 +00:00
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:
parent
d3789cb28d
commit
0f8622dd5c
1 changed files with 25 additions and 20 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue