This directory contains interoperability tests for the V hash.crc64 module, cross-validating
against reference implementations in C and Python.
The fixture verifies that hash.crc64 produces identical CRC-64-ECMA-182 checksums when:
crc64_interop.vsh - Main V interop checker scriptcrc64_ref.c - C reference implementation (auto-compiled)crc64_ref.py - Python reference implementationFrom the V repository root:
v run vlib/hash/crc64/interop/crc64_interop.vsh
The fixture tests 10 vector categories:
hash.crc64.sum(data)crc64_ref.ccrc64_ref.pyAll implementations use CRC-64-ECMA-182:
0x42F0E1EBA9EA36930x00000000000000000x0000000000000000"123456789": 0x6c40df5f0b497347Compiling C reference helper...
Running cross-validation tests...
OK: empty => 0x0000000000000000
OK: single_a => 0x926a79e87a919f5d
OK: single_null => 0xbd4a6ec89c7eaafb
...
=== Results ===
Passed: 10
Failed: 0
Total: 10
If the fixture fails:
gcc and python3 are in PATHhash.crc64 module can be imported (v -silent test vlib/hash/crc64/)python3 crc64_ref.py checksum 313233343536373839 (should match C)