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

Function test_negotiation_needed_indices

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

Source from the content-addressed store, hash-verified

419
420#[test]
421fn 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]
436fn test_negotiation_display() {

Callers

nothing calls this directly

Calls 1

needed_indicesMethod · 0.80

Tested by

no test coverage detected