From e4196b3c4911bf021ec5da2bd65ff8ca0c66e7e7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 26 May 2015 21:08:36 +0300 Subject: Replace gtest with catch. Add basic support for catch. Also add make script for tests. --- src/main.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index a17c4302b..907cc5c89 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -67,6 +67,10 @@ #define SDL_MIXER_VERSION_ATLEAST(X, Y, Z) \ (SDL_MIXER_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)) +#ifdef UNITTESTS +#define CATCH_CONFIG_MAIN +#include "catch.hpp" +#endif #include "debug.h" char *selfName = nullptr; @@ -351,14 +355,4 @@ int main(int argc, char *argv[]) #endif return ret; } - -#else - -// main for unit testing -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} - #endif -- cgit v1.2.3-60-g2f50