Ok made a unittest instead so posting that code with some modifications now. getting the following errors:
error: expected unqualified-id before "do"
error: expected unqualified-id before "while"
these points out the header template setup.
header file
Code:
class TestEvaluationHandlerC
{
public:
TestEvaluationHandlerC();
virtual ~TestEvaluationHandlerC();
public: // template Checks.
template <typename Evaluation> bool CHECK(Evaluation const& evaluation);
};
source file:
Code:
TestEvaluationHandlerC::TestEvaluationHandlerC()
{
}
TestEvaluationHandlerC::~TestEvaluationHandlerC()
{
}
template <typename Evaluation>
bool TestEvaluationHandlerC::CHECK(Evaluation const& evaluation)
{
return evaluation;
}
unittests:
Code:
TEST(TestEvaluationHandlerC_001)
{
TestEvaluationHandlerC * test = new TestEvaluationHandlerC();
CHECK_EQUAL( true, test->CHECK(true) );
CHECK_EQUAL( false, test->CHECK(false) );
delete test;
}
problem might be running it with unittests.