17 #ifndef DEBUG_ALLOCATOR_GUARD
18 #define DEBUG_ALLOCATOR_GUARD
67 class DebugAllocator {
72 int runDebugMain(
int argc,
const char** argv);
75 void* allocate(
size_t size);
80 void* allocate(
size_t size,
const char* file,
size_t lineNumber);
85 void runTest(
TestCase& test,
const string& name);
88 static DebugAllocator& getSingleton();
98 void processDebugOptions(
int& argc,
const char**& argv);
109 void runWithLimit(
int argc,
const char** argv,
size_t limit);
115 bool _debugAllocation;
121 bool _detailAllocation;
127 bool _limitAllocation;
136 bool _expectBadAllocException;
148 size_t _allocationCount;
154 size_t _allocationLimit;
Represents a test case, which is usually created through a macro that defines a subclass.