ultimatepp/bazaar/plugin/gtest/gtest-upp.h
klugier 61e78d1944 .bazaar Fix windows platform detenction in google test upp part.
git-svn-id: svn://ultimatepp.org/upp/trunk@10930 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2017-03-09 22:37:07 +00:00

40 lines
768 B
C++

#ifndef GTEST_INCLUDE_GTEST_UPP_H
#define GTEST_INCLUDE_GTEST_UPP_H
#include <Core/config.h>
#if defined(PLATFORM_WIN32) || defined(PLATFORM_WIN64)
#define TEST_APP_MAIN \
namespace Upp { extern bool PanicMode; } \
\
void TestMainFn(int argc, char** argv); \
\
int main(int argc, char** argv) \
{ \
Upp::PanicMode = true; \
\
testing::InitGoogleTest(&argc, argv); \
TestMainFn(argc, argv); \
return RUN_ALL_TESTS(); \
} \
\
void TestMainFn(int argc, char** argv)
#else
#define TEST_APP_MAIN \
void TestMainFn(int argc, char** argv); \
\
int main(int argc, char** argv) \
{ \
testing::InitGoogleTest(&argc, argv); \
TestMainFn(argc, argv); \
return RUN_ALL_TESTS(); \
} \
\
void TestMainFn(int argc, char** argv)
#endif
#endif