summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp b/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp
index 50268f20a4..26f10385b3 100644
--- a/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp
+++ b/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp
@@ -376,16 +376,22 @@ private slots:
buf = QStringLiteral("default.debug: Check debug with no filter active");
qCDebug(defaultCategory) << "Check debug with no filter active";
QCOMPARE(logMessage, buf);
+ qCDebug(defaultCategory, "Check debug with no filter active");
+ QCOMPARE(logMessage, buf);
// Check default warning
buf = QStringLiteral("default.warning: Check warning with no filter active");
qCWarning(defaultCategory) << "Check warning with no filter active";
QCOMPARE(logMessage, buf);
+ qCWarning(defaultCategory, "Check warning with no filter active");
+ QCOMPARE(logMessage, buf);
// Check default critical
buf = QStringLiteral("default.critical: Check critical with no filter active");
qCCritical(defaultCategory) << "Check critical with no filter active";
QCOMPARE(logMessage, buf);
+ qCCritical(defaultCategory, "Check critical with no filter active");
+ QCOMPARE(logMessage, buf);
QLoggingCategory customCategory("custom");
@@ -412,6 +418,24 @@ private slots:
qCDebug(customCategory) << "Check debug with filter active";
QCOMPARE(logMessage, buf);
+ // Check different macro/category variants
+ buf = QStringLiteral("tst.log.debug: Check debug with no filter active");
+ qCDebug(TST_LOG) << "Check debug with no filter active";
+ QCOMPARE(logMessage, buf);
+ qCDebug(TST_LOG, "Check debug with no filter active");
+ QCOMPARE(logMessage, buf);
+ buf = QStringLiteral("tst.log.warning: Check warning with no filter active");
+ qCWarning(TST_LOG) << "Check warning with no filter active";
+ QCOMPARE(logMessage, buf);
+ qCWarning(TST_LOG, "Check warning with no filter active");
+ QCOMPARE(logMessage, buf);
+ buf = QStringLiteral("tst.log.critical: Check critical with no filter active");
+ qCCritical(TST_LOG) << "Check critical with no filter active";
+ QCOMPARE(logMessage, buf);
+ qCCritical(TST_LOG, "Check critical with no filter active");
+ QCOMPARE(logMessage, buf);
+
+
// reset to default filter
QLoggingCategory::installFilter(0);