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

Function test_deletion_workflow_structure

atomic-core/src/apply/edge.rs:752–772  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

750
751 #[test]
752 fn test_deletion_workflow_structure() {
753 // This test verifies the structure of a deletion workflow
754 let hash = Hash::of(b"file content");
755
756 // 1. Create the edge to delete
757 let edge = NewEdge {
758 previous: EdgeFlags::BLOCK,
759 flag: EdgeFlags::BLOCK | EdgeFlags::DELETED,
760 from: make_position(Some(hash), 0),
761 to: make_external_vertex(Some(hash), 10, 20),
762 introduced_by: Some(hash),
763 };
764
765 // 2. Wrap in EdgeUpdate
766 let mut edge_update = EdgeUpdate::new(make_position(Some(hash), 0));
767 edge_update.push(edge.clone());
768
769 // 3. Verify structure
770 assert_eq!(edge_update.len(), 1);
771 assert!(edge_update.edges[0].flag.contains(EdgeFlags::DELETED));
772 }
773
774 #[test]
775 fn test_undeletion_workflow_structure() {

Callers

nothing calls this directly

Calls 4

make_positionFunction · 0.70
make_external_vertexFunction · 0.70
pushMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected