()
| 419 | |
| 420 | #[test] |
| 421 | fn test_negotiation_needed_indices() { |
| 422 | let manifest = ChunkManifest::new(vec![ |
| 423 | ChunkManifestEntry::new(0, [0xAA; 32], 100, 200), |
| 424 | ChunkManifestEntry::new(1, [0xBB; 32], 100, 200), |
| 425 | ChunkManifestEntry::new(2, [0xCC; 32], 100, 200), |
| 426 | ]); |
| 427 | |
| 428 | let have = vec![[0xBB; 32]]; |
| 429 | let result = ChunkNegotiation::compute(&manifest, &have); |
| 430 | |
| 431 | let indices = result.needed_indices(); |
| 432 | assert_eq!(indices, vec![0, 2]); |
| 433 | } |
| 434 | |
| 435 | #[test] |
| 436 | fn test_negotiation_display() { |
nothing calls this directly
no test coverage detected