MCPcopy Create free account
hub / github.com/KentBeck/BPlusTree3 / verify_ordering

Function verify_ordering

rust/tests/test_utils.rs:312–319  ·  view source on GitHub ↗

Verify tree ordering after operations

(tree: &BPlusTreeMap<i32, String>)

Source from the content-addressed store, hash-verified

310
311/// Verify tree ordering after operations
312pub fn verify_ordering(tree: &BPlusTreeMap<i32, String>) {
313 let items: Vec<_> = tree.items().collect();
314 for i in 1..items.len() {
315 if items[i - 1].0 >= items[i].0 {
316 panic!("Items out of order after operations!");
317 }
318 }
319}
320
321/// Verify tree ordering for integer trees
322pub fn verify_ordering_int(tree: &BPlusTreeMap<i32, i32>) {

Calls 2

itemsMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected