mumuki-cppunit-runner
Before install
sudo apt-get install g++ libcppunit-dev
Run the server
RACK_ENV=development rackup -p 4567
Using the runner
Writing a test
This runner does the following for you:
- adds cpp's requires
- writes the main method for you
In exchange, you must name you CppUnit MumukiTest
and expose a testSuite()
static method - which should be defined using CPP_UNIT_TEST
macros -. Example:
class MumukiTest : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE( MumukiTest );
CPPUNIT_TEST( testFoo );
CPPUNIT_TEST_SUITE_END();
void testFoo()
{
Foo* foo = new Foo();
CPPUNIT_ASSERT( foo->foo() == 4 );
delete foo;
}
};