Call UNITY_CLR_DETAILS() before returning from mock

This commit is contained in:
John Lindgren
2019-07-23 17:41:28 -04:00
parent 9e5afe4255
commit 8b4deef12b
2 changed files with 15 additions and 4 deletions
+6 -2
View File
@@ -57,9 +57,13 @@ class CMockGeneratorPluginCallback
def mock_implementation_for_callbacks_without_arg_check(function)
" if (Mock.#{function[:name]}_CallbackFunctionPointer != NULL)\n {\n" +
if function[:return][:void?]
" #{generate_call(function)};\n return;\n }\n"
" #{generate_call(function)};\n" \
" UNITY_CLR_DETAILS();\n" \
" return;\n }\n"
else
" return #{generate_call(function)};\n }\n"
" #{function[:return][:type]} ret = #{generate_call(function)};\n" \
" UNITY_CLR_DETAILS();\n" \
" return ret;\n }\n"
end
end