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

Method copyOutputParameters

src/CppUTestExt/MockActualCall.cpp:82–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void MockCheckedActualCall::copyOutputParameters(MockCheckedExpectedCall* expectedCall)
83{
84 for (MockOutputParametersListNode* p = outputParameterExpectations_; p; p = p->next_)
85 {
86 MockNamedValue outputParameter = expectedCall->getOutputParameter(p->name_);
87 MockNamedValueCopier* copier = outputParameter.getCopier();
88 if (copier)
89 {
90 copier->copy(p->ptr_, outputParameter.getConstObjectPointer());
91 }
92 else if ((outputParameter.getType() == "const void*") && (p->type_ == "void*"))
93 {
94 const void* data = outputParameter.getConstPointerValue();
95 size_t size = outputParameter.getSize();
96 PlatformSpecificMemCpy(p->ptr_, data, size);
97 }
98 else if (outputParameter.getName() != "")
99 {
100 SimpleString type = expectedCall->getOutputParameter(p->name_).getType();
101 MockNoWayToCopyCustomTypeFailure failure(getTest(), type);
102 failTest(failure);
103 }
104 }
105}
106
107void MockCheckedActualCall::completeCallWhenMatchIsFound()
108{

Callers

nothing calls this directly

Calls 9

PlatformSpecificMemCpyFunction · 0.85
getOutputParameterMethod · 0.80
getCopierMethod · 0.80
getConstObjectPointerMethod · 0.80
getTypeMethod · 0.80
getConstPointerValueMethod · 0.80
getSizeMethod · 0.80
copyMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected