diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-08-05 18:21:22 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-08-10 18:06:36 +0200 |
commit | d9fd41a1febfccb25134cbad0c9b72c43ae32853 (patch) | |
tree | 4a83f8056ec05d99fbe427b474217d5a6d2f9865 /src/testlib/qtestresult.cpp | |
parent | 072e5d2a8f757a0c45d4474075294961ae0e89e2 (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().
Pick-to: 6.2
Change-Id: I284b2785a276e028b9f57c26357679fd9e045ca7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/testlib/qtestresult.cpp')
-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 b8b6ef1e9a..899f5358b5 100644 --- a/src/testlib/qtestresult.cpp +++ b/src/testlib/qtestresult.cpp @@ -231,10 +231,10 @@ void QTestResult::finishedCurrentTestDataCleanup() */ void QTestResult::finishedCurrentTestFunction() { + QTestLog::leaveTestFunction(); + QTest::currentTestFunc = nullptr; QTest::resetFailed(); - - QTestLog::leaveTestFunction(); } const char *QTestResult::currentTestFunction() |