I am trying to create a test test class from a regular class with a constructor declaration (with arguments), as shown below:
hello.h
class hello { public: hello(const uint32_t argID, const uint8_t argCommand); virtual ~hello(); void initialize(); };
where uint32_t: typedef unsigned int
and uint8_t: typedef unsigned char
My test class:
helloTestFixture.h
class helloTestFixture:public testing::Test { public: helloTestFixture(); virtual ~helloTestFixture(); hello m_object; }; TEST_F(helloTestFixture, InitializeCheck)
After trying to implement the above code, it gives me an error:
Error C2512: no appropriate default constructor available
I tried to replicate the constructor built in the hello.h file to the hellotestfixture.h file. Anyway, for this? I tried to implement it in many ways, but have not yet succeeded. Any suggestions on how to implement this?
source share