28 #ifndef D_MemoryLeakWarningPlugin_h
29 #define D_MemoryLeakWarningPlugin_h
31 #include "TestPlugin.h"
42 #define IGNORE_ALL_LEAKS_IN_TEST() MemoryLeakWarningPlugin::getFirstPlugin()->ignoreAllLeaksInTest();
43 #define EXPECT_N_LEAKS(n) MemoryLeakWarningPlugin::getFirstPlugin()->expectLeaksInTest(n);
45 #if CPPUTEST_USE_MEM_LEAK_DETECTION
49 #if CPPUTEST_USE_STD_CPP_LIB
52 void*
operator new(
size_t size)
throw(std::bad_alloc);
53 void*
operator new[](
size_t size)
throw(std::bad_alloc);
54 void*
operator new(
size_t size,
const std::nothrow_t&)
throw();
55 void*
operator new[](
size_t size,
const std::nothrow_t&)
throw();
59 void*
operator new(
size_t size);
60 void*
operator new[](
size_t size);
64 void operator delete(
void* mem)
throw();
65 void operator delete[](
void* mem)
throw();
66 void operator delete(
void* mem,
const char* file,
int line)
throw();
67 void operator delete[](
void* mem,
const char* file,
int line)
throw();
69 #if CPPUTEST_USE_NEW_MACROS
70 #include "MemoryLeakDetectorNewMacros.h"
75 extern void crash_on_allocation_number(
unsigned alloc_number);
90 virtual const char* FinalReport(
int toBeDeletedLeaks = 0);
92 void ignoreAllLeaksInTest();
93 void expectLeaksInTest(
int n);
95 void destroyGlobalDetectorAndTurnOffMemoryLeakDetectionInDestructor(
bool des);
104 static void destroyGlobalDetector();
106 static void turnOffNewDeleteOverloads();
107 static void turnOnNewDeleteOverloads();
110 bool ignoreAllWarnings_;
111 bool destroyGlobalDetectorAndTurnOfMemoryLeakDetectionInDestructor_;
118 extern void* cpputest_malloc_location_with_leak_detection(
size_t size,
const char* file,
int line);
119 extern void* cpputest_realloc_location_with_leak_detection(
void* memory,
size_t size,
const char* file,
int line);
120 extern void cpputest_free_location_with_leak_detection(
void* buffer,
const char* file,
int line);
Definition: TestResult.h:41
Definition: TestPlugin.h:34
Definition: SimpleString.h:46
Definition: MemoryLeakDetector.h:165
Definition: MemoryLeakWarningPlugin.h:80
Definition: MemoryLeakDetector.h:61