Use QTest cleanup method for proper test shutdown

In case of QCOMPARE failure, code following the comparison
is not executed, this results in application state not being
properly resorted and often gives several test failures,
when only one test really fails.
Using QTest cleanup method allows restoring proper state,
before next test is executed.

Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
This commit is contained in:
Jeremie Guichard 2017-03-03 13:33:25 +07:00 committed by Dirk Hohndel
parent 16a321d43b
commit 5caa9b23fe
4 changed files with 14 additions and 8 deletions

View file

@ -8,6 +8,8 @@ class TestGitStorage : public QObject
Q_OBJECT
private slots:
void initTestCase();
void cleanup();
void testGitStorageLocal_data();
void testGitStorageLocal();
void testGitStorageCloud();