# rust/crates/tinyquant-io/tests
Integration and property test suite for the `tinyquant-io` serialization crate.
## What lives here
| `baselines/` | Committed golden output for header-size and format-version audits |
| `fixtures/` | Committed `.tqcv` corpus files generated by `examples/gen_corpus_fixture.rs` |
| `bit_pack_exhaustive.rs` | Exhaustive test of every bit-width × vector-dimension combination |
| `codec_file_proptest.rs` | Property-based round-trip tests via `proptest` |
| `header_size_audit.rs` | Asserts that the binary header does not grow unexpectedly |
| `mmap_corpus.rs` | Memory-mapped corpus open and seek correctness |
| `python_parity.rs` | Byte-level comparison against Python reference fixture output |
| `rejection.rs` | Malformed-input rejection for every documented invalid-header variant |
| `roundtrip.rs` | Encode → decode round-trip for the standard corpus format |
| `smoke.rs` | Minimal sanity checks run on every CI target |
| `zero_copy.rs` | Zero-copy view correctness using committed fixture files |
## How this area fits the system
These tests are the primary quality gate for the serialization layer. They are
run by `cargo test -p tinyquant-io` in CI across every SIMD target. The
`python_parity.rs` test is the cross-language contract that ensures Python and
Rust agree on the binary format.
## Common edit paths
- Add fixtures via `cargo run --example gen_corpus_fixture` when a new
dimension or bit-width is added to the test matrix.
- Update `rejection.rs` whenever a new invalid-header variant is documented.
- Extend `bit_pack_exhaustive.rs` when new bit-width values are introduced in
`tinyquant-core`.
## See also
- [Parent README](../README.md)
- [Local AGENTS.md](./AGENTS.md)