Commit Graph

7 Commits

Author SHA1 Message Date
Kevin Bortis
5e00a01e21 Add FLAC error handling regression tests
Regression tests for the error handling improvements in
fix/flac-error-handling (PR #23). The fix changed decode/encode to
return 0 instead of (size_t)-1 on failure, added NULL allocation
checks, and fixed a decoder memory leak on init failure.

Tests added (flacErrors suite):
- decode_garbage_returns_zero: random non-FLAC data
- decode_truncated_flac_returns_zero: valid magic, truncated stream
- decode_empty_input_returns_zero: NULL source buffer
- decode_zero_length_returns_zero: non-NULL but zero-length source
- encode_zero_length_no_crash: NULL source, verifies no crash/leak
- encode_garbage_roundtrip_fails_cleanly: non-PCM encode + decode
- decode_dst_too_small_returns_zero: undersized output buffer

All tests are self-contained (no fixture files needed) and pass
under AddressSanitizer.
2026-04-01 20:24:13 +02:00
050810c91d Update copyright year to 2026. 2025-12-23 08:23:40 +00:00
a1b3b5db92 Refactor variable declarations for improved clarity and consistency in multiple source files 2025-10-01 02:39:37 +01:00
8542d18ef1 Refactor test fixture classes to use non-const pointers and modern C++ initialization 2025-10-01 00:52:46 +01:00
d518458a63 Update copyright year. 2025-08-01 21:19:45 +01:00
1f813feec9 General refactor and cleanup. 2024-04-30 15:51:32 +01:00
db5b14a56c Add FLAC. 2022-05-28 13:38:09 +01:00