summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestlog_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-10-24 17:49:49 -0700
committerThiago Macieira <thiago.macieira@intel.com>2022-11-09 20:34:12 -0800
commitf341e99aab9393430b588f8824ecb64fb75583d2 (patch)
tree84e4f0fd113ff536a2671dff916ee841d5f53893 /src/testlib/qtestlog_p.h
parent0e8eb20af43ca473b7a7639bb2941c9e6bad537b (diff)
QPlainTestLogger: don't print "RESULT" before each additional result
We do that by passing the full list of results to the logger, to a virtual that is present in the base class to call the existing function. For all but the plain logger, we'll just print multiple results. The plain logger now prints: RESULT : tst_MyClass::QString_toInt() 383 nsecs per iteration (total: 3,837,324, iterations: 10000) 1,069 CPU cycles per iteration (total: 10,692,457, iterations: 10000) 3,123 instructions per iteration (total: 31,230,101, iterations: 10000) 536 branch instructions per iteration (total: 5,360,022, iterations: 10000) Change-Id: I3c79b7e08fa346988dfefffd17203cb5802693dd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/testlib/qtestlog_p.h')
-rw-r--r--src/testlib/qtestlog_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/testlib/qtestlog_p.h b/src/testlib/qtestlog_p.h
index 8852609d7a..9717858afb 100644
--- a/src/testlib/qtestlog_p.h
+++ b/src/testlib/qtestlog_p.h
@@ -63,7 +63,9 @@ public:
static void addBXPass(const char *msg, const char *file, int line);
static void addBXFail(const char *msg, const char *file, int line);
static void addSkip(const char *msg, const char *file, int line);
- static void addBenchmarkResult(const QBenchmarkResult &result);
+ static void addBenchmarkResult(const QList<QBenchmarkResult> &result)
+ { return addBenchmarkResults({ result }); }
+ static void addBenchmarkResults(const QList<QBenchmarkResult> &result);
static void ignoreMessage(QtMsgType type, const char *msg);
#ifndef QT_NO_REGULAREXPRESSION