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

@@ -1,6 +1,7 @@
#ifndef TEST_ASSERT_H
#define TEST_ASSERT_H
#include "flatbuffers/base.h"
#include "flatbuffers/util.h"
// clang-format off
@@ -42,6 +43,12 @@ typedef bool (*TestFailEventListener)(const char *expval, const char *val,
// listener - this function will be notified on each TestFail call.
void InitTestEngine(TestFailEventListener listener = nullptr);
// Release all test-engine resources.
// Prints or schedule a debug report if all test passed.
// Returns 0 if all tests passed or 1 otherwise.
// Memory leak report: FLATBUFFERS_MEMORY_LEAK_TRACKING && _MSC_VER && _DEBUG.
int CloseTestEngine(bool force_report = false);
// Write captured state to a log and terminate test run.
void TestFail(const char *expval, const char *val, const char *exp,
const char *file, int line, const char *func = 0);