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

Function test_manifest_hash_set

atomic-remote/src/streaming/tests.rs:249–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

247
248#[test]
249fn test_manifest_hash_set() {
250 let manifest = ChunkManifest::new(vec![
251 ChunkManifestEntry::new(0, [0xAA; 32], 100, 200),
252 ChunkManifestEntry::new(1, [0xBB; 32], 100, 200),
253 ]);
254
255 let set = manifest.hash_set();
256 assert_eq!(set.len(), 2);
257 assert!(set.contains(&[0xAA; 32]));
258 assert!(set.contains(&[0xBB; 32]));
259 assert!(!set.contains(&[0xCC; 32]));
260}
261
262#[test]
263fn test_manifest_find_by_hash() {

Callers

nothing calls this directly

Calls 1

hash_setMethod · 0.80

Tested by

no test coverage detected