Remove 2 unit tests which make memory leaks

This commit is contained in:
Milo Yip
2015-01-14 23:02:29 +08:00
parent 29fa15580b
commit 7c47cd3498
2 changed files with 23 additions and 3 deletions

View File

@@ -21,10 +21,20 @@
#include "unittest.h"
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
#if _MSC_VER
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
_CrtMemState memoryState = { 0 };
_CrtMemCheckpoint(&memoryState);
//_CrtSetBreakAlloc(X);
//void *testWhetherMemoryLeakDetectionWorks = malloc(1);
#endif
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
int ret = RUN_ALL_TESTS();
#if _MSC_VER
// Current gtest constantly leak 2 blocks at exit
_CrtMemDumpAllObjectsSince(&memoryState);
#endif
return ret;
}