summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-26 21:08:36 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-26 22:43:41 +0300
commite4196b3c4911bf021ec5da2bd65ff8ca0c66e7e7 (patch)
tree223f9b5f9ec1299125e59da65cc62ea85ab915b2 /src/main.cpp
parent055345145f35286b3f45ed05d5a80d118a1ab8f4 (diff)
downloadmanaplus-e4196b3c4911bf021ec5da2bd65ff8ca0c66e7e7.tar.gz
manaplus-e4196b3c4911bf021ec5da2bd65ff8ca0c66e7e7.tar.bz2
manaplus-e4196b3c4911bf021ec5da2bd65ff8ca0c66e7e7.tar.xz
manaplus-e4196b3c4911bf021ec5da2bd65ff8ca0c66e7e7.zip
Replace gtest with catch. Add basic support for catch.
Also add make script for tests.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp14
1 files changed, 4 insertions, 10 deletions
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