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

Function test_archive_manifest_add

atomic-repository/src/archive.rs:1026–1037  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1024
1025 #[test]
1026 fn test_archive_manifest_add() {
1027 let mut manifest = ArchiveManifest::new();
1028
1029 manifest.add(ArchiveEntry::file("file1.txt", 100));
1030 manifest.add(ArchiveEntry::file("file2.txt", 200));
1031 manifest.add(ArchiveEntry::directory("dir/"));
1032
1033 assert_eq!(manifest.entry_count(), 3);
1034 assert_eq!(manifest.file_count, 2);
1035 assert_eq!(manifest.directory_count, 1);
1036 assert_eq!(manifest.total_size, 300);
1037 }
1038
1039 #[test]
1040 fn test_archive_manifest_iterators() {

Callers

nothing calls this directly

Calls 1

addMethod · 0.45

Tested by

no test coverage detected