From 6fb1b0fed9538298cec6247ed90dc1b92fdd4036 Mon Sep 17 00:00:00 2001 From: obligaron Date: Wed, 12 May 2021 20:47:53 +0200 Subject: [PATCH] Seperate main(...) for binary and tests --- Source/main.cpp | 7 ------- test/main.cpp | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 test/main.cpp diff --git a/Source/main.cpp b/Source/main.cpp index ce020ba1c..41b0833cf 100644 --- a/Source/main.cpp +++ b/Source/main.cpp @@ -5,9 +5,6 @@ #ifdef __3DS__ #include "platform/ctr/system.h" #endif -#ifdef RUN_TESTS -#include -#endif #ifdef GPERF_HEAP_MAIN #include #endif @@ -23,10 +20,6 @@ extern "C" const char *__asan_default_options() int main(int argc, char **argv) { -#ifdef RUN_TESTS - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -#endif #ifdef __SWITCH__ switch_enable_network(); #endif diff --git a/test/main.cpp b/test/main.cpp new file mode 100644 index 000000000..b4aa7f06d --- /dev/null +++ b/test/main.cpp @@ -0,0 +1,7 @@ +#include + +int main(int argc, char **argv) +{ + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +}