diff options
author | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2013-12-30 19:44:42 +0100 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-01-07 14:19:33 +0100 |
commit | 0bd59178679ea1f573b484e5f2baf178352c44ef (patch) | |
tree | 5d4a19d2556c9d41bc2a1d4f42510c92a5107d66 /src/plugins/cpptools/cpptoolstestcase.h | |
parent | c7f3ac407394d3c4d7fe817a6a913cd3256c37e5 (diff) | |
download | qt-creator-0bd59178679ea1f573b484e5f2baf178352c44ef.tar.gz |
CppEditor/CppTools: Don't continue in test function on failure
QVERIFY/QCOMPARE are meant to be called in the test function so that on
failure they just can "return" and thus skip subsequent code. Since we
use reusable test code in the test functions (the *TestCase classes), we
need to ensure that on failure no further test code is executed.
This mostly inlines the run function of the test classes into the
constructor.
Change-Id: I320ee032bdde0174ddfe3fdf3f9e18e19abf1d7f
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/plugins/cpptools/cpptoolstestcase.h')
-rw-r--r-- | src/plugins/cpptools/cpptoolstestcase.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cpptoolstestcase.h b/src/plugins/cpptools/cpptoolstestcase.h index 1c9b5b4f59..cdca7c3db7 100644 --- a/src/plugins/cpptools/cpptoolstestcase.h +++ b/src/plugins/cpptools/cpptoolstestcase.h @@ -70,6 +70,7 @@ public: TestCase(bool runGarbageCollector = true); ~TestCase(); + bool succeededSoFar() const; void closeEditorAtEndOfTestCase(Core::IEditor *editor); static bool parseFiles(const QString &filePath); @@ -86,6 +87,7 @@ public: protected: CppModelManagerInterface *m_modelManager; + bool m_succeededSoFar; private: QList<Core::IEditor *> m_editorsToClose; |