()
| 38 | |
| 39 | #[test] |
| 40 | fn test_odd_capacity_split() { |
| 41 | let mut tree = create_tree_5(); |
| 42 | |
| 43 | // Insert enough to force splits with odd capacity |
| 44 | insert_sequential_range(&mut tree, 10); |
| 45 | |
| 46 | // Check leaf node sizes |
| 47 | let leaf_sizes = tree.leaf_sizes(); |
| 48 | println!("Leaf sizes with capacity 5: {:?}", leaf_sizes); |
| 49 | |
| 50 | // With capacity 5, min_keys = 2, so all non-empty leaves should have >= 2 keys |
| 51 | let min_keys = 2; |
| 52 | for &size in &leaf_sizes { |
| 53 | if size > 0 && size < min_keys { |
| 54 | panic!( |
| 55 | "Split created underfull leaf: {} keys < {} minimum", |
| 56 | size, min_keys |
| 57 | ); |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | #[test] |
| 63 | fn test_linked_list_integrity() { |
nothing calls this directly
no test coverage detected