diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-02-19 15:49:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-02-19 15:49:45 +0300 |
commit | b30a5d2289a0b68410dee5343e148aba88ea4839 (patch) | |
tree | 9d756785b9166ced76675ad3ebe398c09b494a3c /src/main.cpp | |
parent | 9a3a196dbf633a699c26d0227802a42f025c8bfd (diff) | |
parent | 164e4ed5a153ce06badb52f3a5a4dff16c58d7e6 (diff) | |
download | ManaVerse-b30a5d2289a0b68410dee5343e148aba88ea4839.tar.gz ManaVerse-b30a5d2289a0b68410dee5343e148aba88ea4839.tar.bz2 ManaVerse-b30a5d2289a0b68410dee5343e148aba88ea4839.tar.xz ManaVerse-b30a5d2289a0b68410dee5343e148aba88ea4839.zip |
Merge branch 'master' into stripped
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5025d6d29..f30e7bc62 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -31,9 +31,14 @@ #include <iostream> #include <physfs.h> +#include "utils/paths.h" #include "utils/stringutils.h" #include "utils/xml.h" +#ifdef UNITTESTS +#include <gtest/gtest.h> +#endif + #ifdef __MINGW32__ #include <windows.h> #endif @@ -209,6 +214,8 @@ static void parseOptions(int argc, char *argv[], Client::Options &options) extern "C" char const *_nl_locale_name_default(void); #endif +#ifndef UNITTESTS +// main for normal game usage int main(int argc, char *argv[]) { #if defined(__MINGW32__) @@ -261,3 +268,14 @@ int main(int argc, char *argv[]) return client.testsExec(); } } + +#else + +// main for unit testing +int main(int argc, char **argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} + +#endif |