MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / create_test_branch

Function create_test_branch

atomic-core/src/crdt/apply/leaf.rs:623–629  ·  view source on GitHub ↗
(txn: &mut MockTxn, change_id: u64, branch_idx: u32)

Source from the content-addressed store, hash-verified

621 // Helper Functions
622
623 fn create_test_branch(txn: &mut MockTxn, change_id: u64, branch_idx: u32) -> BranchId {
624 let trunk_id = TrunkId::new(NodeId::new(change_id), 0);
625 let branch_id = BranchId::new(NodeId::new(change_id), branch_idx);
626 let branch = Branch::new(branch_id, trunk_id);
627 txn.add_branch(branch);
628 branch_id
629 }
630
631 // Insert Tests
632

Callers 12

test_apply_insertFunction · 0.85
test_apply_insert_afterFunction · 0.85
test_apply_deleteFunction · 0.85
test_apply_replaceFunction · 0.85
test_apply_restoreFunction · 0.85
test_validate_leaf_stateFunction · 0.85

Calls 1

add_branchMethod · 0.80

Tested by 12

test_apply_insertFunction · 0.68
test_apply_insert_afterFunction · 0.68
test_apply_deleteFunction · 0.68
test_apply_replaceFunction · 0.68
test_apply_restoreFunction · 0.68
test_validate_leaf_stateFunction · 0.68