FFF is great. Would anyone else see benefit for storing the value/struct that was provided to a fake function through a pointer, rather than just the pointer?
In this example I have to use HAL_GPIO_Init and cannot change it.
I want to test that it is executed the expected number of times and I would want to make sure that it did not initialise the same pin twice. The expected number of times can be checked using the existing call_count. The history of arg0 however, is the same for every call as the pointer is the same value - I cannot check what is in it.
Does anyone more knowledgeable know if this would even be possible?
Hi,
FFF is great. Would anyone else see benefit for storing the value/struct that was provided to a fake function through a pointer, rather than just the pointer?
Example:
code_to_test.c
for(i=0; i<NUM; i++) { GpioDefStructure gpio_defs; gpio_defs.pin = i; HAL_GPIO_Init(&gpio_defs); }
In this example I have to use HAL_GPIO_Init and cannot change it.
I want to test that it is executed the expected number of times and I would want to make sure that it did not initialise the same pin twice. The expected number of times can be checked using the existing call_count. The history of arg0 however, is the same for every call as the pointer is the same value - I cannot check what is in it.
Does anyone more knowledgeable know if this would even be possible?
Thanks