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

Function test_change_append_contents

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

Source from the content-addressed store, hash-verified

973
974 #[test]
975 fn test_change_append_contents() {
976 let mut change = Change::empty(ChangeHeader::new("Test"));
977 let pos = change.append_contents(b"Hello");
978 assert_eq!(pos, 0);
979 let pos2 = change.append_contents(b" World");
980 assert_eq!(pos2, 5);
981 assert_eq!(change.contents, b"Hello World");
982 }
983
984 #[test]
985 fn test_change_finalize() {

Callers

nothing calls this directly

Calls 1

append_contentsMethod · 0.45

Tested by

no test coverage detected