()
| 308 | |
| 309 | #[test] |
| 310 | fn test_manifest_json_roundtrip() { |
| 311 | let manifest = ChunkManifest::new(vec![ |
| 312 | ChunkManifestEntry::new(0, [0xAA; 32], 32000, 65536), |
| 313 | ChunkManifestEntry::new(1, [0xBB; 32], 28000, 65536), |
| 314 | ]); |
| 315 | |
| 316 | let json = serde_json::to_string(&manifest).unwrap(); |
| 317 | let decoded: ChunkManifest = serde_json::from_str(&json).unwrap(); |
| 318 | assert_eq!(manifest, decoded); |
| 319 | } |
| 320 | |
| 321 | // ── ChunkNegotiation ─────────────────────────────────────────── |
| 322 |