diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-08-05 18:21:22 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-08-12 04:39:52 +0000 |
commit | 5bbf922aff30cbcd319dfe2f0bfd93d7a780daf3 (patch) | |
tree | aa2a6d32053688edf6f2a7da99234acde656e6a0 /src/testlib | |
parent | edb423ae7bf3d7b303fbdbc9b94143cd42db795b (diff) |
testlib: Let loggers know which test function is being left
None of the loggers rely on this at the moment, but one could imagine
one that does. Plus, doing any sort of debug logging in leaveTestFunction
will at the moment be attributed to UnknownTestFunc().
Change-Id: I284b2785a276e028b9f57c26357679fd9e045ca7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit d9fd41a1febfccb25134cbad0c9b72c43ae32853)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/testlib')
-rw-r--r-- | src/testlib/qtestresult.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testlib/qtestresult.cpp b/src/testlib/qtestresult.cpp index 10cff22b8c..bdd60d257d 100644 --- a/src/testlib/qtestresult.cpp +++ b/src/testlib/qtestresult.cpp @@ -230,10 +230,10 @@ void QTestResult::finishedCurrentTestDataCleanup() */ void QTestResult::finishedCurrentTestFunction() { + QTestLog::leaveTestFunction(); + QTest::currentTestFunc = nullptr; QTest::resetFailed(); - - QTestLog::leaveTestFunction(); } const char *QTestResult::currentTestFunction() |