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

Function test_split_validation_missing

rust/tests/bug_reproduction_tests.rs:282–305  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

280
281#[test]
282fn test_split_validation_missing() {
283 let tree = create_tree_4_with_data(20);
284
285 // Check that all nodes satisfy B+ tree properties after splits
286 // This test passes if the validation exists, fails if it's missing
287
288 assert!(
289 tree.check_invariants(),
290 "Split validation should ensure invariants are maintained"
291 );
292
293 // Check specific split conditions
294 let leaf_sizes = tree.leaf_sizes();
295 let min_keys = 2; // For capacity 4
296
297 for &size in &leaf_sizes {
298 assert!(
299 size == 0 || size >= min_keys,
300 "Split validation missing: leaf with {} keys < min {}",
301 size,
302 min_keys
303 );
304 }
305}

Callers

nothing calls this directly

Calls 2

create_tree_4_with_dataFunction · 0.85
leaf_sizesMethod · 0.80

Tested by

no test coverage detected