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

Function test_negotiation_display

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

Source from the content-addressed store, hash-verified

434
435#[test]
436fn 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]
450fn test_negotiation_empty_manifest() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected