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 Microsoft::VisualStudio::CppUnitTestFramework;
namespace UnitTestfff
{
TEST_CLASS(UnitTestfff)
{
public:
TEST_METHOD(TestMethod1)
{
}
};
}
The function ioFunc returns a bool and takes void as input.
When I try to build the code I get the following errors: "one or more multiply defined symbols found" and "ioFunc already defined in ioDigitalInput.obj"
What am I doing wrong?