Questions tagged [fake-function-framework]

4 questions
1
vote
1 answer

Fake Function Framework "one or more multiply defined symbold found"

I am using the Fake Function Framework to fake a function in a .c file and test it in my .cpp unit test file. #include "..\fff.h" extern "C" { #include "ioDigitalInput.h" } DEFINE_FFF_GLOBALS; FAKE_VALUE_FUNC(bool, ioFunc); using namespace…
1
vote
1 answer

Fake Function Framework not working with STM32 HAL functions

I am using FFF - Fake Function Framework to stub out some calls in my unit tests. This is working fine in many instances. I can stub out any of the functions I have written myself, as well as any calls to FreeRTOS functions. When I call these…
Smoggie Tom
  • 306
  • 4
  • 12
1
vote
1 answer

How do you mock and test the same function in C/C++ with FFF and Google Test?

I am exploring TDD (Test Driven Development) to test the code that I am writing in C and C++. I have chosen to use Google Test as the unit test framework. I have chosen to use FFF as the mocking framework. I have written a few tests and run them and…
0
votes
1 answer

Error in mocking for embedded unit testing "Address of overloaded function does not match required type 'void()'

I am working on an Embedded C project for which I am currently writing unit tests. I am using the fff mocking framework, which essentially creates fake function calls which should overload hardware specific calls. When I create a 'fake function' I…
Smoggie Tom
  • 306
  • 4
  • 12