~ubuntu-branches/ubuntu/wily/psi/wily-proposed

« back to all changes in this revision

Viewing changes to iris/src/xmpp/qa/README

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2009-09-25 17:49:51 UTC
  • mfrom: (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090925174951-lvm7kdap82o8xhn3
Tags: 0.13-1
* Updated to upstream version 0.13
* Set Standards-Version to 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.
 
15
 
 
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.
 
20
 
 
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'.