()
| 247 | |
| 248 | #[test] |
| 249 | fn 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] |
| 263 | fn test_manifest_find_by_hash() { |