User Tools

Site Tools


This is an old revision of the document!

Draft: this page is under construction…

Implementing Unit Tests

For Mail2Voice Next, we introduced unit tests. They are based on the QTest Suite.

Each class of Mail2Voice must have its dedicated unit test class.


Let's say we have a class named MyClass with the following header :

class MyClass
    MyClass(); // Constructor initializing some properties
    void increment(); // Add 1 to m_count
    void setText(const QString& text); // Set m_text to text
    int count(); // Returns current m_count value
    int m_count;
    QString m_text;
unit_tests.1473315440.txt.gz · Last modified: 2020/10/11 09:50 (external edit)