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

Function test_append_contents

atomic-core/src/record/builder.rs:645–657  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

643
644 #[test]
645 fn test_append_contents() {
646 let mut builder = RecordBuilder::new();
647
648 let start1 = builder.append_contents(b"Hello");
649 assert_eq!(start1, 0);
650 assert_eq!(builder.contents_len(), 5);
651
652 let start2 = builder.append_contents(b" World");
653 assert_eq!(start2, 5);
654 assert_eq!(builder.contents_len(), 11);
655
656 assert_eq!(builder.contents(), b"Hello World");
657 }
658
659 #[test]
660 fn test_append_empty_contents() {

Callers

nothing calls this directly

Calls 1

append_contentsMethod · 0.45

Tested by

no test coverage detected