From f1dc3eca2fffd85566c23850136c0650c5d9fa2d Mon Sep 17 00:00:00 2001 From: klugier Date: Sat, 12 Sep 2020 15:43:49 +0000 Subject: [PATCH] Bazaar: plain GTest leaks ignored only on windows. git-svn-id: svn://ultimatepp.org/upp/trunk@15023 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- bazaar/GTestExample/StringTest.h | 4 ++-- bazaar/plugin/gtest/gtest-upp.h | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bazaar/GTestExample/StringTest.h b/bazaar/GTestExample/StringTest.h index 41ce1e57f..ccf02a97f 100644 --- a/bazaar/GTestExample/StringTest.h +++ b/bazaar/GTestExample/StringTest.h @@ -1,5 +1,5 @@ -#ifndef _GoogleTestExample_VectorTest_h_ -#define _GoogleTestExample_VectorTest_h_ +#ifndef _GTestExample_StringTest_h_ +#define _GTestExample_StringTest_h_ #include #include diff --git a/bazaar/plugin/gtest/gtest-upp.h b/bazaar/plugin/gtest/gtest-upp.h index 8e0d4f365..d3495a734 100644 --- a/bazaar/plugin/gtest/gtest-upp.h +++ b/bazaar/plugin/gtest/gtest-upp.h @@ -3,11 +3,18 @@ #include +#if defined(PLATFORM_WIN32) || defined(PLATFORM_WIN64) +#define TEST_APP_MAIN_IGNORE_LEAKS Upp::MemoryIgnoreLeaksBlock __; +#else +#define TEST_APP_MAIN_IGNORE_LEAKS +#endif + #define TEST_APP_MAIN \ void TestMainFn(); \ \ int main(int argc, char** argv) \ { \ + TEST_APP_MAIN_IGNORE_LEAKS \ UPP::AppInit__(argc, (const char **)argv); \ testing::InitGoogleTest(&argc, argv); \ UPP::AppExecute__(TestMainFn); \