When trying to run make on a unit test using fff.h to fake a function initSerialCommDevice i get the following error:
In file included from /home/zanev/mbed/AFDAU_0_01/UNITTESTS/app/drivers/test_rockair.cpp:6:0:
/home/zanev/mbed/AFDAU_0_01/UNITTESTS/app/drivers/test_rockair.cpp: In function ‘int initSerialCommDevice(uint8_t, uint32_t, uint8_t, serialParity_e, uint8_t)’:
/home/zanev/mbed/AFDAU_0_01/UNITTESTS/app/drivers/test_rockair.cpp:10:22: error: overloaded function with no contextual type information
FAKE_VALUE_FUNC(int, initSerialCommDevice, uint8_t, uint32_t, uint8_t, serialParity_e, uint8_t);
my test file is as follows (initSerialCommDevice is prototyped in _hal_serial.h):
From the digging I have done on the issue it appears that the compiler is seeing the function in the _hal_serial.h file and also seeing the function that the macro is creating and is having an issue. I have looked over the example code and tried to see where I have gone wrong but everything seems to be as it should. Can anybody point me in the right direction here?
I have fixed my issue... very basic rookie mistake! This issue can be closed. FYI, an argument in the prototype was supposed to be a uint8_t and I had an int.
When trying to run make on a unit test using fff.h to fake a function initSerialCommDevice i get the following error:
my test file is as follows (initSerialCommDevice is prototyped in _hal_serial.h):
From the digging I have done on the issue it appears that the compiler is seeing the function in the _hal_serial.h file and also seeing the function that the macro is creating and is having an issue. I have looked over the example code and tried to see where I have gone wrong but everything seems to be as it should. Can anybody point me in the right direction here?