MCPcopy Create free account
hub / github.com/cpputest/cpputest / getDeallocationString

Method getDeallocationString

src/CppUTestExt/CodeMemoryReportFormatter.cpp:130–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130SimpleString CodeMemoryReportFormatter::getDeallocationString(TestMemoryAllocator* allocator, const SimpleString& variableName, const char* file, size_t line)
131{
132 if (isNewAllocator(allocator))
133 return StringFromFormat("delete [] %s; /* using %s at %s:%d */", variableName.asCharString(), allocator->free_name(), file, (int) line);
134 else
135 return StringFromFormat("free(%s); /* at %s:%d */", variableName.asCharString(), file, (int) line);
136}
137
138void CodeMemoryReportFormatter::report_test_start(TestResult* result, UtestShell& test)
139{

Callers

nothing calls this directly

Calls 3

StringFromFormatFunction · 0.85
asCharStringMethod · 0.80
free_nameMethod · 0.45

Tested by

no test coverage detected