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

Function test_find_position_branch_ids

atomic-core/src/crdt/apply/order.rs:530–540  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

528
529 #[test]
530 fn test_find_position_branch_ids() {
531 let id1 = BranchId::new(NodeId::new(1), 0);
532 let id2 = BranchId::new(NodeId::new(2), 0);
533 let id3 = BranchId::new(NodeId::new(3), 0);
534
535 let concurrent = vec![id1, id3];
536 let pos = find_branch_insert_position(&id2, &concurrent);
537
538 // id2 should go after id1 (index 0)
539 assert_eq!(pos, InsertPosition::After(0));
540 }
541
542 #[test]
543 fn test_find_position_leaf_ids() {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected