So i need to use gTest.
I have a util class with static functions.
The header file contain the declerations of the functions:
class a
{
public:
a();
virtual ~a();
static bool test();
}
on the cpp file the implementations:
a::a() { }
a::~a() { }
bool a::test() { return true; }
on the test unit file i just added a test :
TEST(a, a)
{
EXPECT_EQ(true,a::test());
}
I'm getting a linker error :
Error 3 error LNK2001: unresolved external symbol "public: static bool __cdecl a::test()" (?test@a@@SA_NIPAD0@Z) UnitTest.obj UnitTest
if the implementation of the static function is in the .h file , everything work smoothly.
is there anyway to uni test static function that way?