diff --git a/include/main.h b/include/main.h index 57c47df6c4da6b84e285088aa7c852dff37d437f..2449a85a4f46f89ec696f1e7a91bfc661513adac 100644 --- a/include/main.h +++ b/include/main.h @@ -4,8 +4,10 @@ #include <iostream> #include <cstdint> -#ifndef __TEST_RUNNER__ +#ifdef __TEST_RUNNER__ +#ifndef DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN +#endif // DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #include "doctest.h" #include "testlist.hpp" #endif // __TEST_RUNNER__ diff --git a/src/main.cpp b/src/main.cpp index 82f1e0b4d661ad9eaaf907bf03eb01209370ce17..5b0ceb70b8cccf0c7d19e72fbb280767e25a5b32 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -61,7 +61,4 @@ int main( int argc, char* argv[] ) { } // int /*WINAPI*/ WinMain(/*HINSTANCE hInstance, HINSTANCE, LPSTR, int*/) { main(); return 0; } -#else -#include "doctest.h" -#include "testlist.hpp" #endif // __TEST_RUNNER__