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

Function test_change_add_hunk

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

Source from the content-addressed store, hash-verified

981
982 #[test]
983 fn test_change_add_hunk() {
984 let mut change = Change::empty(ChangeHeader::new("Test"));
985 let graph_op: GraphOp<Option<Hash>> = GraphOp::Edit {
986 change: Atom::Insertion(test_new_vertex()),
987 local: Local::new("test.rs", 1),
988 encoding: Some(Encoding::Utf8),
989 };
990 change.add_hunk(graph_op);
991
992 assert_eq!(change.hunks().len(), 1);
993 }
994
995 #[test]
996 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