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

Method clear

src/CppUTestExt/MockSupport.cpp:113–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void MockSupport::clear()
114{
115 delete lastActualFunctionCall_;
116 lastActualFunctionCall_ = NULLPTR;
117
118 tracing_ = false;
119 MockActualCallTrace::clearInstance();
120
121 expectations_.deleteAllExpectationsAndClearList();
122 ignoreOtherCalls_ = false;
123 enabled_ = true;
124 actualCallOrder_ = 0;
125 expectedCallOrder_ = 0;
126 strictOrdering_ = false;
127
128 for (MockNamedValueListNode* p = data_.begin(); p; p = p->next()) {
129 MockSupport* support = getMockSupport(p);
130 if (support) {
131 support->clear();
132 delete support;
133 }
134 }
135 data_.clear();
136}
137
138void MockSupport::strictOrder()
139{

Callers 4

clear_cFunction · 0.45
TESTFunction · 0.45

Calls 3

beginMethod · 0.80
nextMethod · 0.80

Tested by 1

TESTFunction · 0.36