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

Function test_find_position_leaf_ids

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

Source from the content-addressed store, hash-verified

541
542 #[test]
543 fn test_find_position_leaf_ids() {
544 let id1 = LeafId::new(NodeId::new(1), 0);
545 let id2 = LeafId::new(NodeId::new(2), 0);
546 let id3 = LeafId::new(NodeId::new(3), 0);
547
548 let concurrent = vec![id1, id3];
549 let pos = find_leaf_insert_position(&id2, &concurrent);
550
551 // id2 should go after id1 (index 0)
552 assert_eq!(pos, InsertPosition::After(0));
553 }
554
555 // OrderingEntry Tests
556

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected