summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestlog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib/qtestlog.cpp')
-rw-r--r--src/testlib/qtestlog.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp
index 58de622126..0951b9b309 100644
--- a/src/testlib/qtestlog.cpp
+++ b/src/testlib/qtestlog.cpp
@@ -258,6 +258,9 @@ namespace QTest {
void QTestLog::enterTestFunction(const char* function)
{
+ if (printAvailableTags)
+ return;
+
QTEST_ASSERT(function);
QTest::TestLoggers::enterTestFunction(function);
@@ -276,6 +279,9 @@ int QTestLog::unhandledIgnoreMessages()
void QTestLog::leaveTestFunction()
{
+ if (printAvailableTags)
+ return;
+
QTest::IgnoreResultList::clearList(QTest::ignoreResultList);
QTest::TestLoggers::leaveTestFunction();
}
@@ -294,6 +300,9 @@ void QTestLog::printUnhandledIgnoreMessages()
void QTestLog::addPass(const char *msg)
{
+ if (printAvailableTags)
+ return;
+
QTEST_ASSERT(msg);
QTest::TestLoggers::addIncident(QAbstractTestLogger::Pass, msg);
@@ -431,4 +440,11 @@ void QTestLog::setMaxWarnings(int m)
QTest::maxWarnings = m <= 0 ? INT_MAX : m + 2;
}
+bool QTestLog::printAvailableTags = false;
+
+void QTestLog::setPrintAvailableTagsMode()
+{
+ printAvailableTags = true;
+}
+
QT_END_NAMESPACE