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

Method removeFirstMatchingExpectation

src/CppUTestExt/MockExpectedCallsList.cpp:238–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238MockCheckedExpectedCall* MockExpectedCallsList::removeFirstMatchingExpectation()
239{
240 for (MockExpectedCallsListNode* p = head_; p; p = p->next_) {
241 if (p->expectedCall_->isMatchingActualCall()) {
242 MockCheckedExpectedCall* matchingCall = p->expectedCall_;
243 p->expectedCall_ = NULLPTR;
244 pruneEmptyNodeFromList();
245 return matchingCall;
246 }
247 }
248 return NULLPTR;
249}
250
251void MockExpectedCallsList::pruneEmptyNodeFromList()
252{

Callers 1

checkExpectationsMethod · 0.80

Calls 1

isMatchingActualCallMethod · 0.80

Tested by

no test coverage detected