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

Function test_change_add_hunk

atomic-core/src/change/change.rs:962–972  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

960
961 #[test]
962 fn test_change_add_hunk() {
963 let mut change = Change::empty(ChangeHeader::new("Test"));
964 let graph_op: GraphOp<Option<Hash>> = GraphOp::Edit {
965 change: Atom::Insertion(test_new_vertex()),
966 local: Local::new("test.rs", 1),
967 encoding: Some(Encoding::Utf8),
968 };
969 change.add_hunk(graph_op);
970
971 assert_eq!(change.hunks().len(), 1);
972 }
973
974 #[test]
975 fn test_change_append_contents() {

Callers

nothing calls this directly

Calls 3

InsertionClass · 0.85
test_new_vertexFunction · 0.70
add_hunkMethod · 0.45

Tested by

no test coverage detected