You may even define just the default
helloTestFixture
constructor, but you have to provide arguments to
hello
constructor for initializeing
m_object
. The following code
typedef unsigned int uint32_t;
typedef unsigned char uint8_t;
class hello
{
public:
hello(const uint32_t argID, const uint8_t argCommand);
virtual ~hello();
void initialize();
};
hello::hello(const uint32_t argID, const uint8_t argCommand){}
hello::~hello(){}
void hello::initialize(){}
class helloTestFixture
{
public:
helloTestFixture();
virtual ~helloTestFixture();
hello m_object;
};
helloTestFixture::helloTestFixture():m_object(0,0){}
helloTestFixture::~helloTestFixture(){}
int main()
{
helloTestFixture htf;
htf.m_object.initialize();
}
compiles and runs nicely.