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

Function test_archive_manifest_sort

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

Source from the content-addressed store, hash-verified

1049
1050 #[test]
1051 fn test_archive_manifest_sort() {
1052 let mut manifest = ArchiveManifest::new();
1053 manifest.add(ArchiveEntry::file("c.txt", 10));
1054 manifest.add(ArchiveEntry::file("a.txt", 10));
1055 manifest.add(ArchiveEntry::file("b.txt", 10));
1056
1057 manifest.sort();
1058
1059 assert_eq!(manifest.entries[0].path, "a.txt");
1060 assert_eq!(manifest.entries[1].path, "b.txt");
1061 assert_eq!(manifest.entries[2].path, "c.txt");
1062 }
1063
1064 #[test]
1065 fn test_archive_manifest_display() {

Callers

nothing calls this directly

Calls 2

sortMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected