Summary
Current tests cover happy-path roundtrips and a few top-level decoder errors, but malformed parser/decoder coverage is shallow. We need targeted regression tests for corrupted WAV and LAC structures.
Affected areas
tests/test_e2e.cpp
tests/test_zerorun.cpp
- new malformed-input test files if useful
Test cases to add
WAV:
- truncated RIFF header
- truncated chunk-size field
fmt chunk smaller than 16 bytes
- data before
fmt
- invalid
byte_rate and block_align
- oversized declared
data chunk with short payload
- odd-sized unknown chunks and padding
LAC/container/block:
- invalid block count
- oversized block table
- truncated block payload
- invalid per-block stereo flag
- unsupported predictor orders
- invalid residual modes and reserved tags
- zero-run overflow beyond partition size
- trailing bytes after a valid stream
Acceptance criteria
- Each malformed fixture fails deterministically without crashes or excessive allocation.
- Tests do not require large binary files in the repository.
- Tests can run in CI without the ignored local
assets/ directory.
Summary
Current tests cover happy-path roundtrips and a few top-level decoder errors, but malformed parser/decoder coverage is shallow. We need targeted regression tests for corrupted WAV and LAC structures.
Affected areas
tests/test_e2e.cpptests/test_zerorun.cppTest cases to add
WAV:
fmtchunk smaller than 16 bytesfmtbyte_rateandblock_aligndatachunk with short payloadLAC/container/block:
Acceptance criteria
assets/directory.