diff --git a/benchmarks/Catch2Main.cpp b/benchmarks/Catch2Main.cpp new file mode 100644 index 0000000..94fcb08 --- /dev/null +++ b/benchmarks/Catch2Main.cpp @@ -0,0 +1,17 @@ +// All test files are included in the executable via the Glob in CMakeLists.txt + +#include "juce_gui_basics/juce_gui_basics.h" +#include + +int main (int argc, char* argv[]) +{ + // This lets us use JUCE's MessageManager without leaking. + // PluginProcessor might need this if you use the APVTS for example. + // You'll also need it for tests that rely on juce::Graphics, juce::Timer, etc. + // It's nicer DX when placed here vs. manually in Catch2 SECTIONs + juce::ScopedJuceInitialiser_GUI gui; + + const int result = Catch::Session().run (argc, argv); + + return result; +} diff --git a/tests/Catch2Main.cpp b/tests/Catch2Main.cpp new file mode 100644 index 0000000..d786588 --- /dev/null +++ b/tests/Catch2Main.cpp @@ -0,0 +1,18 @@ +// All test files are included in the executable via the Glob in CMakeLists.txt + +#include "juce_gui_basics/juce_gui_basics.h" +#include + +int main (int argc, char* argv[]) +{ + // This lets us use JUCE's MessageManager without leaking. + // PluginProcessor might need this if you use the APVTS for example. + // You'll also need it for tests that rely on juce::Graphics, juce::Timer, etc. + // It's nicer DX when placed here vs. manually in Catch2 SECTIONs + juce::ScopedJuceInitialiser_GUI gui; + + const int result = Catch::Session().run (argc, argv); + + return result; +} +#include