I'm using doctest with DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
defined so that doctest provides its own main function when I run tests. It's been working great this way but now I need to run some setup code that is executed before any of the tests. Where can I put this code?
Currently, I have the tests defined in my regular .cpp files and just have the following in doctest.cpp:
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest.h"