diff options
Diffstat (limited to 'src/testlib/qjunittestlogger.cpp')
-rw-r--r-- | src/testlib/qjunittestlogger.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/testlib/qjunittestlogger.cpp b/src/testlib/qjunittestlogger.cpp index 69b31edb6e..4ee5788bee 100644 --- a/src/testlib/qjunittestlogger.cpp +++ b/src/testlib/qjunittestlogger.cpp @@ -9,13 +9,6 @@ #include <QtTest/private/qbenchmark_p.h> #include <QtTest/private/qtestlog_p.h> -#ifdef min // windows.h without NOMINMAX is included by the benchmark headers. -# undef min -#endif -#ifdef max -# undef max -#endif - #include <QtCore/qlibraryinfo.h> #include <string.h> @@ -28,7 +21,7 @@ QT_BEGIN_NAMESPACE QJUnitTestLogger implements logging in a JUnit-compatible XML format. The \l{JUnit XML} format was originally developed for Java testing. - It is supported by \l{Squish Test Center}. + It is supported by \l{Test Center}. */ // QTBUG-95424 links to further useful documentation. @@ -45,7 +38,7 @@ QJUnitTestLogger::~QJUnitTestLogger() // We track test timing per test case, so we // need to maintain our own elapsed timer. -static QElapsedTimer elapsedTestcaseTime; +Q_CONSTINIT static QElapsedTimer elapsedTestcaseTime; static qreal elapsedTestCaseSeconds() { return elapsedTestcaseTime.nsecsElapsed() / 1e9; @@ -179,7 +172,7 @@ void QJUnitTestLogger::leaveTestFunction() void QJUnitTestLogger::leaveTestCase() { currentTestCase->addAttribute(QTest::AI_Time, - toSecondsFormat(elapsedTestCaseSeconds()).constData()); + toSecondsFormat(elapsedTestCaseSeconds() * 1000).constData()); if (!systemOutputElement->childElements().empty()) currentTestCase->addChild(systemOutputElement); |