diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-07 10:55:01 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-07 10:55:01 +0100 |
| commit | ce5fe72bf5711c5f943c40bedd99f89ac5b7012f (patch) | |
| tree | 7926008055fe4e4f633fc500d929f3ec8e99dab5 /doc/ASSET_SYSTEM.md | |
| parent | 41876cd44b29113fbe72749665f1dd4fd473f27a (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 'doc/ASSET_SYSTEM.md')
0 files changed, 0 insertions, 0 deletions
