summaryrefslogtreecommitdiff
path: root/src/util/asset_manager.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-07 10:55:01 +0100
committerskal <pascal.massimino@gmail.com>2026-02-07 10:55:01 +0100
commitce5fe72bf5711c5f943c40bedd99f89ac5b7012f (patch)
tree7926008055fe4e4f633fc500d929f3ec8e99dab5 /src/util/asset_manager.cc
parent41876cd44b29113fbe72749665f1dd4fd473f27a (diff)
test(audio): Add error handling tests for WavDumpBackend
Added comprehensive error handling tests to verify WavDumpBackend handles invalid file paths gracefully without crashes. New test: test_invalid_file_paths() - Tests null filename (nullptr) - Tests non-existent directory path - Tests permission denied (root directory write) All cases verify: - Error message is printed to stderr - No crash or abort() - write_audio() does nothing (no segfault) - samples_written counter stays at 0 - shutdown() handles nullptr gracefully Example output: Error: Failed to open WAV file: (null) ✓ Null filename handled gracefully Error: Failed to open WAV file: /nonexistent/directory/test.wav ✓ Invalid directory path handled gracefully Error: Failed to open WAV file: /test.wav ✓ Permission denied handled gracefully This improves test coverage by verifying error paths that could cause crashes or undefined behavior in production. All 27 tests pass (including new error handling tests). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/util/asset_manager.cc')
0 files changed, 0 insertions, 0 deletions