I cant get CppUnit 1.5.3 to work with my clean TestCase. When I compile I
get the following errors below.
My test class (DiscoCamTestCase) derives from TestCase and implements
countTestCases, which returns 1 and another test method.
The compile error is provoked by the following method
CppUnit::TestSuite*
DiscoCamTestCase::suite()
{
TestSuite *suiteOfTests = new TestSuite;
suiteOfTests->addTest(new TestCaller<DiscoCamTestCase>("testAdd", testReset));
return suiteOfTests;
}
Ive almost copied everything from the code documentation for TestCase, but I have no clue on what is wrong or how I can fix it.
Any help is appreciated.
Im posting here, since I cant find any good documentation on how
to create a very simple testcase.
------COMPILE ERROR ------------
DiscoCamTestCase.cpp: In function `static class CppUnit::TestSuite * DiscoCamTestCase::suite()':
DiscoCamTestCase.cpp:27: cannot allocate an object of type `CppUnit::TestSuite'
DiscoCamTestCase.cpp:27: since the following virtual functions are abstract:
/usr/local/include/cppunit/Test.h:21: int CppUnit::Test::countTestCases() const
DiscoCamTestCase.cpp:28: cannot allocate an object of type `CppUnit::TestCaller<DiscoCamTestCase>'
DiscoCamTestCase.cpp:28: since the following virtual functions are abstract:
/usr/local/include/cppunit/Test.h:21: int CppUnit::Test::countTestCases() const
-----------------------------------------
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I cant get CppUnit 1.5.3 to work with my clean TestCase. When I compile I
get the following errors below.
My test class (DiscoCamTestCase) derives from TestCase and implements
countTestCases, which returns 1 and another test method.
The compile error is provoked by the following method
CppUnit::TestSuite*
DiscoCamTestCase::suite()
{
TestSuite *suiteOfTests = new TestSuite;
suiteOfTests->addTest(new TestCaller<DiscoCamTestCase>("testAdd", testReset));
return suiteOfTests;
}
Ive almost copied everything from the code documentation for TestCase, but I have no clue on what is wrong or how I can fix it.
Any help is appreciated.
Im posting here, since I cant find any good documentation on how
to create a very simple testcase.
------COMPILE ERROR ------------
DiscoCamTestCase.cpp: In function `static class CppUnit::TestSuite * DiscoCamTestCase::suite()':
DiscoCamTestCase.cpp:27: cannot allocate an object of type `CppUnit::TestSuite'
DiscoCamTestCase.cpp:27: since the following virtual functions are abstract:
/usr/local/include/cppunit/Test.h:21: int CppUnit::Test::countTestCases() const
DiscoCamTestCase.cpp:28: cannot allocate an object of type `CppUnit::TestCaller<DiscoCamTestCase>'
DiscoCamTestCase.cpp:28: since the following virtual functions are abstract:
/usr/local/include/cppunit/Test.h:21: int CppUnit::Test::countTestCases() const
-----------------------------------------
This is due to the lack of "const" in certain places. Look
in patches, where I have posted a fix.