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.
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 Cake 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/Tests
Based on the PAMPLEJUCE template, code takes also some inspiration from here.