Crow
Crow copied to clipboard
Split unittest into multiple files
I'm a little confused as to how the source files are able to use
CHECK
without actually including the Catch2 header..Another thing that interested me is that everything is still considered one test, what do you think about splitting them into different targets? (just a thought, I'm not leaning either way)
CMake force includes a precompiled header by default. I disabled it for catch.cpp
to get a main
function defined without linking errors.
Catch has the ability to look for tests on its own (catch_discover_tests
), I'd rather use that function. I focused on splitting them apart, but maybe I should give them a more complete rework. Found out that unittests won't properly run on Windows (although they compile fine). They'll just get stuck eventually.