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

Function test_single_insertion

rust/tests/debug_infinite_loop.rs:39–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37
38#[test]
39fn test_single_insertion() {
40 println!("Creating tree...");
41 let mut tree: BPlusTreeMap<i32, String> = BPlusTreeMap::new(4).unwrap();
42
43 println!("Inserting one item...");
44 tree.insert(1, "one".to_string());
45
46 println!("Getting leaf count...");
47 let count = tree.leaf_count();
48 println!("Leaf count: {}", count);
49
50 assert_eq!(count, 1); // Should still have 1 leaf
51}
52
53#[test]
54fn test_split_balance() {

Callers

nothing calls this directly

Calls 2

insertMethod · 0.45
leaf_countMethod · 0.45

Tested by

no test coverage detected