summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolstestcase.h
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2013-12-30 19:44:42 +0100
committerNikolai Kosjar <nikolai.kosjar@digia.com>2014-01-07 14:19:33 +0100
commit0bd59178679ea1f573b484e5f2baf178352c44ef (patch)
tree5d4a19d2556c9d41bc2a1d4f42510c92a5107d66 /src/plugins/cpptools/cpptoolstestcase.h
parentc7f3ac407394d3c4d7fe817a6a913cd3256c37e5 (diff)
downloadqt-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.h2
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;