diff --git a/bazaar/GTestExample/main.cpp b/bazaar/GTestExample/main.cpp index ec5323afa..eaefbb411 100644 --- a/bazaar/GTestExample/main.cpp +++ b/bazaar/GTestExample/main.cpp @@ -1,3 +1,4 @@ +#include #include TEST_APP_MAIN {} diff --git a/bazaar/GTestUIExample/TestAppWindow.cpp b/bazaar/GTestUIExample/TestAppWindow.cpp index e2afd4c25..4e257f242 100644 --- a/bazaar/GTestUIExample/TestAppWindow.cpp +++ b/bazaar/GTestUIExample/TestAppWindow.cpp @@ -15,7 +15,7 @@ class AppWindowTest : public testing::Test { protected: AppWindowTest() - : windowRect(0, 0, 200, 200) + : windowRect(0, 0, 250, 250) {} void SetUp() override diff --git a/bazaar/plugin/gtest/gtest-upp.h b/bazaar/plugin/gtest/gtest-upp.h index 7477fefce..8e0d4f365 100644 --- a/bazaar/plugin/gtest/gtest-upp.h +++ b/bazaar/plugin/gtest/gtest-upp.h @@ -3,36 +3,20 @@ #include -#if defined(PLATFORM_WIN32) || defined(PLATFORM_WIN64) - - #define TEST_APP_MAIN \ - void TestMainFn(int argc, char** argv); \ - \ - int main(int argc, char** argv) \ - { \ - Upp::MemoryIgnoreLeaksBlock __; \ - 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 +#define TEST_APP_MAIN \ +void TestMainFn(); \ +\ +int main(int argc, char** argv) \ +{ \ + UPP::AppInit__(argc, (const char **)argv); \ + testing::InitGoogleTest(&argc, argv); \ + UPP::AppExecute__(TestMainFn); \ + int testsResult = RUN_ALL_TESTS(); \ + UPP::AppExit__(); \ + return testsResult; \ +} \ +\ +void TestMainFn() #if defined(PLATFORM_WIN32) || defined(PLATFORM_WIN64)