Repair MSVC-CRT leakage detector and enable this detection with Appveyor-CI (#5105)

This commit is contained in:
Vladimir Glavnyy
2019-01-25 04:30:11 +07:00
committed by Wouter van Oortmerssen
parent 38bf4cfc03
commit 3f388ec747
6 changed files with 60 additions and 34 deletions

View File

@@ -2463,13 +2463,6 @@ void CreateSharedStringTest() {
int FlatBufferTests() {
// clang-format off
#if defined(FLATBUFFERS_MEMORY_LEAK_TRACKING) && \
defined(_MSC_VER) && defined(_DEBUG)
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF
// For more thorough checking:
//| _CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_DELAY_FREE_MEM_DF
);
#endif
// Run our various test suites:
@@ -2563,9 +2556,8 @@ int main(int /*argc*/, const char * /*argv*/ []) {
if (!testing_fails) {
TEST_OUTPUT_LINE("ALL TESTS PASSED");
return 0;
} else {
TEST_OUTPUT_LINE("%d FAILED TESTS", testing_fails);
return 1;
}
return CloseTestEngine();
}