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

Function test_finish_with_data

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

Source from the content-addressed store, hash-verified

807
808 #[test]
809 fn test_finish_with_data() {
810 let mut builder = RecordBuilder::new();
811
812 builder.append_contents(b"test content");
813 builder.add_hunk(create_test_file_add_hunk());
814 builder.update_largest_file(100);
815 builder.mark_binary_file();
816
817 let recorded = builder.finish();
818
819 assert!(!recorded.is_empty());
820 assert_eq!(recorded.hunk_count(), 1);
821 assert_eq!(recorded.contents(), b"test content");
822 assert_eq!(recorded.largest_file(), 100);
823 assert!(recorded.has_binary_files());
824 }
825
826 // Clear Tests
827

Callers

nothing calls this directly

Calls 6

update_largest_fileMethod · 0.80
mark_binary_fileMethod · 0.80
append_contentsMethod · 0.45
add_hunkMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected