1
How to add unit tests to a module
2
---------------------------------
3
- Copy the qa/unittest.template module to the module dir, and rename it to
4
'unittest'. Be careful not to copy '.svn'.
5
- Create a file <classname>test.cpp for every class, and implement the tests
6
for each method.. See 'myclasstest.cpp' for a template.
7
- Add every <classname>test.cpp file to 'unittest.pri'
8
- In 'unittest.pro', replace '$$MYMODULE' with the name of the module that you
9
are unit testing. Also include all the modules that are required to compile
10
a standalone checker for the module under test.
11
- Add an 'include' line to the list of unit tests in qa/unittests.pri. This
12
is used to compile the full unit test suite of all modules.
13
- Make sure 'qa/unittests.pro' contains the module under test, and make
14
sure that it compiles and runs fine.
16
How to run the unit tests of a specific module
17
----------------------------------------------
18
In the 'unittest' subdir of a module, run 'qmake', and then run 'make check'
19
to build and run the standalone checker for the module.
21
How to run all unit tests
22
-------------------------
23
First, make sure Iris has been built.
24
Go to qa/unittests, run 'qmake', and run 'make check'.