How to add unit tests to a module
- Copy the qa/unittest.template module to the module dir, and rename it to
'unittest'. Be careful not to copy '.svn'.
- Create a file <classname>test.cpp for every class, and implement the tests
for each method.. See 'myclasstest.cpp' for a template.
- Add every <classname>test.cpp file to 'unittest.pri'
- In 'unittest.pro', replace '$$MYMODULE' with the name of the module that you
are unit testing. Also include all the modules that are required to compile
a standalone checker for the module under test.
- Add an 'include' line to the list of unit tests in qa/unittests.pri. This
is used to compile the full unit test suite of all modules.
- Make sure 'qa/unittests.pro' contains the module under test, and make
sure that it compiles and runs fine.
SEE ALSO: README