# Testing

Tests are deterministic and run on `wasm`, `wasm-gc`, `js`, and `native`.

The named suite covers syntax, OWS, case-insensitive units, unknown units,
overflow, malformed numbers, suffix and open-ended resolution, clipping,
zero-length representations, partial and complete unsatisfiability,
normalization, `Accept-Ranges`, `Content-Range`, response and multipart plans,
limits, audit findings, errors, If-Range validators, IMF-fixdate dates,
reconstructed RFC examples, and CLI helpers.

`test_property.mbt` executes 2,700 generated cases from fixed-seed integer
generators. The Range suite checks parse/serialize stability, canonical
idempotence, resolved interval invariants, and ordered non-overlapping coalesced
output. The extended suites round-trip `Content-Range` and `Accept-Ranges`
values, exercise strong entity-tag comparison combinations, and verify
multipart estimate structure: a multi-part estimate must equal the sum of its
single-part plans minus the duplicated closing delimiters.

`test_stress.mbt` probes limit edges: 256 ranges under permissive limits,
exact and off-by-one input limits, the 19-digit Int64 boundary, multipart
boundary length edges, bounded audits on dense requests, and unknown-unit raw
set limits.

`test_truncation.mbt` passes every prefix of complex Range, Content-Range, and
Accept-Ranges fixtures to public parsers. Each invocation must return `Ok` or
`Err`; a panic, hang, or out-of-bounds read fails the test.

Use `scripts/count_code.py` for measured source and case counts, and
`scripts/verify_all.ps1` for the fail-fast full matrix.
