A unit test can be created by subclassing the QObject class and adding the slots required by the Qt Test Framework into it, along with one or more slots (test functions) for performing various tests. The following slots (private slots) can exist in each test class and are called by Qt Test, in addition to test functions:
- initTestCase: This is called before the first test function is called. If this function fails, the entire test will fail and no test function will be called.
- cleanupTestCase: This is called after the last test function is called.
- init: This is called before each test function is called. If this function fails, the preceding test function will not be executed.
- cleanup: This is called after each test function ...