MOCKABLE_FUNCTION vs MOCK_FUNCTION_WITH_CODE
Open
bug
- Dominant language
- C
- Stars
- 36
- Forks
- 27
- Avg merge
- 32m
- Merged PRs (30d)
- 3
Description
MOCKABLE_FUNCTION is not the same as MOCK_FUNCTION_WITH_CODE.
A MOCK_FUNCTION_WITH_CODE *will* be called in the context of negative tests. a MOCKABLE_FUNCTION will not be called. Note: the MO_FUNCTION_WITH_CODE will return the proper (FAIL) return value, but the code will be executed.
The workaround is to use only MOCKABLE_FUNCTIONs and have a REGISTER_GLOBAL_MOCK_HOOK. The hook is not called in the context of negative tests.
Best Regards,
Andrei Porumb
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.