I tried using the IgnoreArg functionality of CMock, but it doesn't seem to work. The mocks for ignore_arg are not being generated.
The other plugins seem to work just fine for me.
In my testing function I use the following sequence:
test_NameStrings(void)
{
char testName[] = "Test123";
GetModuleNameString_ExpectAndReturn(1, NULL, 20); // when called, make sure slot is 1, but don't care about the string yet and return 20
GetModuleNameString_IgnoreArg_strName(); // this mock is not generated (error: implicit declaration)
GetModuleNameString_ReturnMemThruPtr_strName(testName, sizeof(testName));
func_that_will_call_GetModuleNameString_somewhere(...);
TEST_ASSERTS_...
}
Here I get an error, that GetModuleNameString_IgnoreArg_strName() is declarated implicitly.
At the moment I use GetModuleNameString_ExpectAnyArgsAndReturn(20) instead and it works, but I would like to check the slot parameter too.
Thanks for this great tool so far. Any help would be appreciated!
Hello,
I tried using the IgnoreArg functionality of CMock, but it doesn't seem to work. The mocks for ignore_arg are not being generated. The other plugins seem to work just fine for me.
My project.yaml includes the ignore_arg Plugin:
An example function that I want to mock:
In my testing function I use the following sequence:
Here I get an error, that GetModuleNameString_IgnoreArg_strName() is declarated implicitly.
At the moment I use GetModuleNameString_ExpectAnyArgsAndReturn(20) instead and it works, but I would like to check the slot parameter too.
Thanks for this great tool so far. Any help would be appreciated!