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

Function assert_invariants

rust/tests/test_utils.rs:170–174  ·  view source on GitHub ↗

Standard invariant check with panic on failure

(tree: &BPlusTreeMap<i32, String>, context: &str)

Source from the content-addressed store, hash-verified

168
169/// Standard invariant check with panic on failure
170pub fn assert_invariants(tree: &BPlusTreeMap<i32, String>, context: &str) {
171 if let Err(e) = tree.check_invariants_detailed() {
172 panic!("Invariant violation in {}: {}", context, e);
173 }
174}
175
176/// Standard invariant check for integer trees
177pub fn assert_invariants_int(tree: &BPlusTreeMap<i32, i32>, context: &str) {

Callers 15

test_create_empty_treeFunction · 0.85
test_update_existing_keyFunction · 0.85
test_contains_keyFunction · 0.85
test_get_with_defaultFunction · 0.85
test_overflowFunction · 0.85
test_split_then_addFunction · 0.85
test_parent_splittingFunction · 0.85

Calls 1

Tested by

no test coverage detected