summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2014-02-28 17:18:09 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-20 13:45:35 +0100
commit503d761c0867760b96d6f7f6d44854926c6b7e0c (patch)
treef68c043e76df3fc23e117abc336f9b739dc7dfef /tests/auto
parentbaa3d329ac0033ee1914c177347811645e79545d (diff)
Print when logging rule is invalid.
Print a warning when an invalid logging rule is parsed. Change-Id: I3bf9a6df4053d36b3803652b2faa86168d5222bc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp
index 4318396bd4..32ce91dc6a 100644
--- a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp
+++ b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp
@@ -302,6 +302,16 @@ private slots:
QVERIFY(!cat.isWarningEnabled());
}
+
+ void QLoggingRegistry_checkErrors()
+ {
+ QLoggingSettingsParser parser;
+ QString warnMsg = QString("Ignoring malformed logging rule: '***=false'");
+ QTest::ignoreMessage(QtWarningMsg, warnMsg.toLocal8Bit().constData());
+ parser.setContent("[Rules]\n"
+ "***=false\n");
+ QVERIFY(parser.rules().isEmpty());
+ }
};
QTEST_MAIN(tst_QLoggingRegistry)