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

Function freeInvalidatesMemory

tests/CppUTest/MemoryOperatorOverloadTest.cpp:106–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104#if CPPUTEST_USE_MEM_LEAK_DETECTION
105
106CPPUTEST_DO_NOT_SANITIZE_ADDRESS
107static void freeInvalidatesMemory()
108{
109 unsigned char* memory = (unsigned char*) cpputest_malloc(sizeof(unsigned char));
110 *memory = 0xAD;
111 cpputest_free(memory);
112 CHECK(*memory != 0xAD);
113}
114
115TEST(BasicBehavior, freeInvalidatesMemory)
116{

Callers 1

TESTFunction · 0.85

Calls 2

cpputest_mallocFunction · 0.85
cpputest_freeFunction · 0.85

Tested by

no test coverage detected