Using CppUnit

The arcticle of codeproject is very clear about using CppUnit.
http://www.codeproject.com/library/Using_CPPUnit.asp

But I will speak about some important issues about the upon article:
1)If we use vs2005,RTTI setting is enalbed defaultly.We needn't to do it.
2)We can down load the source code from http://sourceforge.net/projects/cppunit
3)Compile the project in folder cppunit-1.10.2/src
4)When we compile the project successfully,we are only need of two folders named as"lib" and "include"
5)For our testing class,we need to add this line into .cpp file:
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestOpen,"freebird");

6)As well as,we need to add some codes into Instance member function of our application class
    CppUnit::MfcUi::TestRunner runner;
 runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("freebird").makeTest());
    runner.run();

你可能感兴趣的:(cpp)