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

Function test_negotiation_json_roundtrip

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

Source from the content-addressed store, hash-verified

467
468#[test]
469fn test_negotiation_json_roundtrip() {
470 let manifest = ChunkManifest::new(vec![
471 ChunkManifestEntry::new(0, [0xAA; 32], 100, 200),
472 ChunkManifestEntry::new(1, [0xBB; 32], 300, 400),
473 ]);
474
475 let result = ChunkNegotiation::compute(&manifest, &[[0xAA; 32]]);
476 let json = serde_json::to_string(&result).unwrap();
477 let decoded: ChunkNegotiation = serde_json::from_str(&json).unwrap();
478 assert_eq!(result, decoded);
479}
480
481// ── StreamingPushOptions ───────────────────────────────────────
482

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected