mock_Verify functions should ideally not modify the state of the mock.

In typical unit tests, this doesn't matter since the Verify functions
are called only from the end of the test.  However, in longer integration
tests, where a sequence of function calls is to be tested, it's handy
to be able to verify the Expects halfway through the test.  This change
is a first step in making that possible.
This commit is contained in:
John Lindgren
2018-08-28 14:51:41 -04:00
parent 7cc41ddfdd
commit 63527a3217
7 changed files with 17 additions and 8 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ class CMockGeneratorPluginCallback
def mock_verify(function)
func_name = function[:name]
" if (Mock.#{func_name}_CallbackFunctionPointer != NULL)\n Mock.#{func_name}_CallInstance = CMOCK_GUTS_NONE;\n"
" if (Mock.#{func_name}_CallbackFunctionPointer != NULL)\n call_instance = CMOCK_GUTS_NONE;\n"
end
end