#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/ui/text/TestRunner.h>

class TestFixtureName : public CppUnit::TestFixture  {

  CPPUNIT_TEST_SUITE( TestFixtureName );
  CPPUNIT_TEST( testFunction1 );
  CPPUNIT_TEST( testFunction2 );
  ...
  CPPUNIT_TEST_SUITE_END();


public:

  void testFunction1()
  {
    code to create some data objects
    test with CPPUNIT_ASSERT( test );
    or CPPUNIT_ASSERT_EQUAL( expected_value, expression );
    
  }

  void testFunction2()
  {
    code to create and test some data objects
  }
  ...
};

int main( int argc, char **argv)
{
  CppUnit::TextUi::TestRunner runner;
  runner.addTest( TestFixtureName::suite() );
  runner.run();
  return 0;
}