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

Function test_order_conflict_add_insertion

atomic-core/src/apply/conflict.rs:602–614  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

600
601 #[test]
602 fn test_order_conflict_add_insertion() {
603 let pos = make_position(42, 100);
604 let mut conflict = OrderConflict::new(pos);
605
606 let v1 = make_vertex(100, 0, 10);
607 let v2 = make_vertex(200, 0, 20);
608
609 conflict.add_insertion(v1, NodeId::new(100));
610 conflict.add_insertion(v2, NodeId::new(200));
611
612 assert_eq!(conflict.conflict_count(), 2);
613 assert_eq!(conflict.changes.len(), 2);
614 }
615
616 #[test]
617 fn test_order_conflict_no_duplicates() {

Callers

nothing calls this directly

Calls 3

add_insertionMethod · 0.80
make_positionFunction · 0.70
make_vertexFunction · 0.70

Tested by

no test coverage detected