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

Method shouldFail

src/CppUTest/TestMemoryAllocator.cpp:301–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299 }
300
301 bool shouldFail(int allocationNumber, const char* file, size_t line)
302 {
303 if (file_ && SimpleString::StrCmp(file, file_) == 0 && line == line_) {
304 actualAllocNumber_++;
305 return actualAllocNumber_ == allocNumberToFail_;
306 }
307 if (allocationNumber == allocNumberToFail_)
308 return true;
309 return false;
310 }
311
312 private:
313 void init(LocationToFailAllocNode* next = NULLPTR)

Callers 1

alloc_memoryMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected