## Property-Based Tests for Unified Storage ## ## Feature: 01-nip-unified-storage-and-formats ## Property 2: Chunk Integrity ## Validates: Requirements 2.2 ## ## This test verifies that xxh3 hash integrity is maintained for all chunks: ## For any CAS chunk, the xxh3 hash SHALL match the chunk content after decompression import std/[unittest, os, random, strutils] import ../src/nip/unified_storage import ../src/nip/xxhash # Simple property-based testing framework type TestCase = object data: string description: string proc generateRandomData(size: int): string = ## Generate random data for testing result = newString(size) for i in 0..