()
| 791 | |
| 792 | #[test] |
| 793 | fn test_chunk_large_data() { |
| 794 | // 2 MB of pseudo-random data |
| 795 | let data: Vec<u8> = (0..2_000_000u64) |
| 796 | .map(|i| { |
| 797 | // Simple PRNG for deterministic "random" data |
| 798 | ((i.wrapping_mul(6364136223846793005) |
| 799 | .wrapping_add(1442695040888963407)) |
| 800 | >> 33) as u8 |
| 801 | }) |
| 802 | .collect(); |
| 803 | let chunks = chunk_content(&data, &ChunkingOptions::default()); |
| 804 | |
| 805 | // 2MB / 64KB avg ≈ 31 chunks |
| 806 | assert!(chunks.len() >= 5, "2MB should produce at least 5 chunks"); |
| 807 | |
| 808 | verify_chunks_cover_data(&data, &chunks); |
| 809 | } |
| 810 | |
| 811 | #[test] |
| 812 | fn test_chunk_highly_repetitive_data() { |
nothing calls this directly
no test coverage detected