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

Function test_deletion_workflow_structure

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

Source from the content-addressed store, hash-verified

928
929 #[test]
930 fn test_deletion_workflow_structure() {
931 // This test verifies the structure of a deletion workflow
932 let hash = Hash::of(b"file content");
933
934 // 1. Create the edge to delete
935 let edge = NewEdge {
936 previous: EdgeFlags::BLOCK,
937 flag: EdgeFlags::BLOCK | EdgeFlags::DELETED,
938 from: make_position(Some(hash), 0),
939 to: make_external_vertex(Some(hash), 10, 20),
940 introduced_by: Some(hash),
941 };
942
943 // 2. Wrap in EdgeUpdate
944 let mut edge_update = EdgeUpdate::new(make_position(Some(hash), 0));
945 edge_update.push(edge.clone());
946
947 // 3. Verify structure
948 assert_eq!(edge_update.len(), 1);
949 assert!(edge_update.edges[0].flag.contains(EdgeFlags::DELETED));
950 }
951
952 #[test]
953 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