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

Function test_chunk_medium_data

atomic-core/src/change/format_v3/chunking.rs:779–790  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

777
778 #[test]
779 fn test_chunk_medium_data() {
780 // 500 KB of varied data — should produce multiple chunks
781 let data: Vec<u8> = (0..500_000).map(|i| (i % 251) as u8).collect();
782 let chunks = chunk_content(&data, &ChunkingOptions::default());
783
784 // 500KB / 64KB avg ≈ 7-8 chunks
785 assert!(chunks.len() >= 2, "should produce multiple chunks");
786 assert!(chunks.len() <= 50, "shouldn't produce too many chunks");
787
788 // Verify contiguous coverage
789 verify_chunks_cover_data(&data, &chunks);
790 }
791
792 #[test]
793 fn test_chunk_large_data() {

Callers

nothing calls this directly

Calls 2

chunk_contentFunction · 0.85
verify_chunks_cover_dataFunction · 0.85

Tested by

no test coverage detected