Closed CanadianHoser closed 5 years ago
I think this is better implemented in your code rather that fff. Not that it is a bad idea, but for consistency's sake we would need to add GET_XXXX macros for every field. My feeling is that hiding the struct fields behind macros is more about personal coding style than usability.
I agree; this can be achieve with your own implementation and would unduly introduce complexity to FFF that it can do without.
Feel free to post an example if you found a solution.
I'd like to add a macro into FFF which returns the call count for a mock. This would allow the user to change calls from something like:
CHECK_EQUAL(1, function_to_mock_fake.call_count); to CHECK_EQUAL(1, GET_CALL_COUNT(function_to_mock));
This better masks the internals of the fff framework.
MACRO:
define GET_CALL_COUNT(FUNCNAME) \