()
| 434 | |
| 435 | #[test] |
| 436 | fn test_negotiation_display() { |
| 437 | let manifest = ChunkManifest::new(vec![ |
| 438 | ChunkManifestEntry::new(0, [0xAA; 32], 32000, 65536), |
| 439 | ChunkManifestEntry::new(1, [0xBB; 32], 28000, 65536), |
| 440 | ]); |
| 441 | |
| 442 | let have = vec![[0xAA; 32]]; |
| 443 | let result = ChunkNegotiation::compute(&manifest, &have); |
| 444 | let display = format!("{}", result); |
| 445 | assert!(display.contains("need 1 of 2")); |
| 446 | assert!(display.contains("saved")); |
| 447 | } |
| 448 | |
| 449 | #[test] |
| 450 | fn test_negotiation_empty_manifest() { |
nothing calls this directly
no outgoing calls
no test coverage detected