1 In this directory I will store the testcases for KBruch. A file containing a
2 test suite for a "class" has the following file name:
6 In this file there is a class (struct) named "class"_test_suite and the class
7 containing the test cases. This class is called "class"_test. Every member
8 function of the original class is tested in a seperated member function of the
9 "class"_test class. Those functions are named
11 "class"_test::test_"memberFunction"() {...}
13 Before you can compile it, you have to make symlinks from the source directory
14 to this directory. The simplest way is to use the following bash script:
20 # save the current directory
24 # delete all symbolic links
28 # now go the source directory
32 echo "Createing symlinks to the source files..."
34 # make a symlink from every *.cpp file to this directory
38 ln -s ../src/$a ../testcases/$a
41 # make a symlink from every *.h file to this directory
45 ln -s ../src/$a ../testcases/$a
48 # and back to the testcases directory
54 And you need the boost library installed. I think this will be the hardest
55 thing. You can get boost from http://www.boost.org/
57 If you want to compile the whole tests not under Linux using gcc, you maybe
58 have to edit the Makefile.am in this directory to correctly link against
59 libboost_unit_test_framework-YOURCOMPILER. Edit the following line in
62 kbruch_test_LDADD = -lboost_unit_test_framework-gcc $(LIB_KDEUI)
64 I hope someone finds a portable way to do this Makefile stuff. Please fix it,
65 I'm not a Automake/Autoconf guru!
67 You can compile the test program by typing:
71 If you were able to compile it, you can execute the test case program
72 kbruch_test from within this directory.
74 I hope this helps a little bit.
76 Sebastian Stein <seb.kde@hpfsc.de>