Starting from the PAMPLEJUCE template, here is an example on how to implement some unit testing of a lowpass filter. Both time domain and frequency domain tests were implemented.
Note that the examples provided still have big margins of improvements, this is more of a proof of concept.
The filter class is located in /source and test cases can be found in tests/FilterTests.cpp
assuming you already know JUCE and how to use its CMake integration:
- read CATCH2 documentation
- implement your own JUCE class and put it in
/source - think about some meaningful tests and implement them in
tests, note that you will probably need to write your own custom matchers
cmake -B build
cmake --build ./build --parallel./build/TestsBased on the PAMPLEJUCE template, code takes also some inspiration from here.