summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-08-16 16:58:32 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-27 20:25:06 +0000
commit9cc3e2bf877f75ed28ebb3717b5e84f609e77802 (patch)
tree96a3776631fbf41e95234fd0e0d7ce208279d4a9 /src/testlib
parentbd0b2075a3717e4eb60b12b3dfe6965b3c2375ec (diff)
Make clear why QTestLog::addB?XFail() don't add to counters
This reverts commit 904617dfb83f39a6a379635b64fea6fcd00f241a and makes clear to future readers why that wouldn't be a sensible change. Update the test's data, eliminating a case of duplicate counting that was caused by the reverted commit. Task-number: QTBUG-95661 Change-Id: Ice6d3ab06ca171e0d6eb0fac757f1ab774e229f0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 7af79ba09148dbfe5c1fc8b130d564dcca7ae4b3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtestlog.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp
index 212dc927a4..7e311d273e 100644
--- a/src/testlib/qtestlog.cpp
+++ b/src/testlib/qtestlog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2020 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtTest module of the Qt Toolkit.
@@ -337,6 +337,8 @@ void QTestLog::addXFail(const char *msg, const char *file, int line)
{
QTEST_ASSERT(msg);
+ // Will be counted in addPass() if we get there.
+
FOREACH_TEST_LOGGER
logger->addIncident(QAbstractTestLogger::XFail, msg, file, line);
}
@@ -385,7 +387,7 @@ void QTestLog::addBXFail(const char *msg, const char *file, int line)
{
QTEST_ASSERT(msg);
- ++QTest::blacklists;
+ // Will be counted in addBPass() if we get there.
FOREACH_TEST_LOGGER
logger->addIncident(QAbstractTestLogger::BlacklistedXFail, msg, file, line);