diff options
Diffstat (limited to 'src/testlib')
| -rw-r--r-- | src/testlib/qtestcase.cpp | 13 | ||||
| -rw-r--r-- | src/testlib/qtestcase.h | 1 |
2 files changed, 4 insertions, 10 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 784e69d2486..a98f5da2389 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -410,7 +410,7 @@ public: static QMetaMethod findMethod(const QObject *obj, const char *signature); private: - bool invokeTest(int index, QLatin1StringView tag, std::optional<WatchDog> &watchDog) const; + void invokeTest(int index, QLatin1StringView tag, std::optional<WatchDog> &watchDog) const; void invokeTestOnData(int index) const; QMetaMethod m_initTestCaseMethod; // might not exist, check isValid(). @@ -1315,11 +1315,8 @@ static void printUnknownDataTagError(QLatin1StringView name, QLatin1StringView t Call slot_data(), init(), slot(), cleanup(), init(), slot(), cleanup(), ... If data is set then it is the only test that is performed - - If the function was successfully called, true is returned, otherwise - false. */ -bool TestMethods::invokeTest(int index, QLatin1StringView tag, std::optional<WatchDog> &watchDog) const +void TestMethods::invokeTest(int index, QLatin1StringView tag, std::optional<WatchDog> &watchDog) const { QBenchmarkTestMethodData benchmarkData; QBenchmarkTestMethodData::current = &benchmarkData; @@ -1422,8 +1419,6 @@ bool TestMethods::invokeTest(int index, QLatin1StringView tag, std::optional<Wat QTestResult::finishedCurrentTestFunction(); QTestResult::setSkipCurrentTest(false); QTestResult::setBlacklistCurrentTest(false); - - return true; } void *fetchData(QTestData *data, const char *tagName, int typeId) @@ -1743,10 +1738,8 @@ void TestMethods::invokeTests(QObject *testObject) const const char *data = nullptr; if (i < QTest::testTags.size() && !QTest::testTags.at(i).isEmpty()) data = qstrdup(QTest::testTags.at(i).toLatin1().constData()); - const bool ok = invokeTest(i, QLatin1StringView(data), watchDog); + invokeTest(i, QLatin1StringView(data), watchDog); delete [] data; - if (!ok) - break; } } diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h index ad3874bd4c9..02ccb9709dc 100644 --- a/src/testlib/qtestcase.h +++ b/src/testlib/qtestcase.h @@ -15,6 +15,7 @@ #include <QtCore/qtemporarydir.h> #include <QtCore/qthread.h> +#include <chrono> #ifdef __cpp_concepts #include <concepts> #endif |
