testlib: Make testlogs enumerable and printable

Change-Id: Id0ac30fe0a63757ef722634e6dd90806015467aa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Tor Arne Vestbø 2020-02-07 12:43:40 +01:00
parent 9557715016
commit 93b8cdc974
2 changed files with 6 additions and 0 deletions

View File

@ -597,4 +597,6 @@ qint64 QTestLog::nsecsFunctionTime()
return elapsedFunctionTime.nsecsElapsed();
}
#include "moc_qtestlog_p.cpp"
QT_END_NAMESPACE

View File

@ -57,6 +57,8 @@
#include <QtCore/private/qcore_mac_p.h>
#endif
#include <QtCore/qobjectdefs.h>
QT_BEGIN_NAMESPACE
class QBenchmarkResult;
@ -65,6 +67,7 @@ class QTestData;
class Q_TESTLIB_EXPORT QTestLog
{
Q_GADGET
public:
QTestLog() = delete;
~QTestLog() = delete;
@ -79,6 +82,7 @@ public:
, XCTest
#endif
};
Q_ENUM(LogMode);
static void enterTestFunction(const char* function);
static void leaveTestFunction();