Verify tree ordering for integer trees
(tree: &BPlusTreeMap<i32, i32>)
| 320 | |
| 321 | /// Verify tree ordering for integer trees |
| 322 | pub fn verify_ordering_int(tree: &BPlusTreeMap<i32, i32>) { |
| 323 | let items: Vec<_> = tree.items().collect(); |
| 324 | for i in 1..items.len() { |
| 325 | if items[i - 1].0 >= items[i].0 { |
| 326 | panic!("Items out of order after operations!"); |
| 327 | } |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | /// Verify tree has expected number of items |
| 332 | pub fn verify_item_count(tree: &BPlusTreeMap<i32, String>, expected: usize, context: &str) { |
no test coverage detected