diff options
| author | skal <pascal.massimino@gmail.com> | 2026-01-27 22:26:27 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-01-27 22:26:27 +0100 |
| commit | 364d9e60e3c27cb131a598fe5f83deb74493319f (patch) | |
| tree | 09d2dbb23f537bccad81b2c6ccdb25dd9b52ea46 /CMakeLists.txt | |
| parent | f3a68c76a32c7467b0c9493e7f4cc16de2b2c227 (diff) | |
test(spectool): Add end-to-end test for analysis tool
Adds a new CTest unit test that performs a full, end-to-end verification of the 'spectool analyze' command.
The test programmatically generates a sine wave, saves it as a .wav file, executes the spectool executable as a subprocess to analyze the wave, and then verifies the integrity of the resulting .spec file.
This ensures the analysis pipeline (WAV decoding, windowing, FDCT, and file I/O) works correctly.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7828ada..5f1167f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,6 +58,21 @@ if(DEMO_BUILD_TESTS) src ) add_test(NAME SynthEngineTest COMMAND test_synth) + + add_executable(test_spectool + src/tests/test_spectool.cpp + src/audio/audio.cpp # For miniaudio implementation + src/audio/window.cpp + src/audio/fdct.cpp + src/audio/synth.cpp + src/audio/idct.cpp + ) + target_include_directories(test_spectool PRIVATE + src + third_party + ) + add_dependencies(test_spectool spectool) + add_test(NAME SpectoolEndToEndTest COMMAND test_spectool) endif() option(DEMO_BUILD_TOOLS "Build tools" OFF) |
