50 likes | 266 Views
Install CppUnit. Download the cppunit( cppunit-1.12.0.tar.gz ) in the following link https://sourceforge.net/project/showfiles.php?group_id=11795&package_id=11019&release_id=428545. Install CppUnit. 2. Using the following commands - gunzip cppunit-1.12.0.tar.gz
E N D
Install CppUnit Download the cppunit(cppunit-1.12.0.tar.gz) in the following link https://sourceforge.net/project/showfiles.php?group_id=11795&package_id=11019&release_id=428545
Install CppUnit 2. Using the following commands - gunzip cppunit-1.12.0.tar.gz - tar –xvf cppunit-1.12.0.tar - cd cppunit-1.12.0
Install CppUnit ./configure --prefix =“/users/projects/groups/morale/isvis/cppunit” --disable-shared
Install CppUnit • make • make install 5. cppunit-config --version (Test that CppUnit has been installed properly. If you see 1.12.0 as the output, then CppUnit has been installed properly.)
Testing CppUnit • Create a testfiles directory. • Put all files in it including your programs and test program. • Compile your programs by g++ -c (eg. g++ -c TestStudent.cpp) • Compile test program by g++ -I../include –c (eg. g++ -I../include -c TestStudent.cpp) • put everything together to create an executable test program (g++ -o tester Course.o Student.o TestStudent.o –L../lib –lcppunit) • To run the test suite, simply type: tester