summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qloggingregistry
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2014-03-17 10:16:08 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-03 11:07:07 +0200
commitb11adb825c4dfc8429695947cef8f9e3253ad0c2 (patch)
tree6d5ca3c3ffe2d11494b3b51dd67c7ad64274db0d /tests/auto/corelib/io/qloggingregistry
parent828cfb4019939a39c84e5c5e17dc8cb52e9f63fd (diff)
Logging: Be also more strict with value of logging rule
Only accept lower-case "true" and "false", as documented. The old check didn't match either the documentation, nor the QSettings/ QVariant behavior (where, for a boolean value, any lower-cased content that not empty, "0" or "false" is considered true). Change-Id: I317d29c16a27f862001b9dff02e8298df8acf5a6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'tests/auto/corelib/io/qloggingregistry')
-rw-r--r--tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp
index 3064fd1320..5623990bd1 100644
--- a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp
+++ b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp
@@ -306,10 +306,13 @@ private slots:
void QLoggingRegistry_checkErrors()
{
QLoggingSettingsParser parser;
- QString warnMsg = QString("Ignoring malformed logging rule: '***=false'");
- QTest::ignoreMessage(QtWarningMsg, warnMsg.toLocal8Bit().constData());
+ QTest::ignoreMessage(QtWarningMsg, "Ignoring malformed logging rule: '***=false'");
+ QTest::ignoreMessage(QtWarningMsg, "Ignoring malformed logging rule: '*=0'");
+ QTest::ignoreMessage(QtWarningMsg, "Ignoring malformed logging rule: '*=TRUE'");
parser.setContent("[Rules]\n"
- "***=false\n");
+ "***=false\n"
+ "*=0\n"
+ "*=TRUE\n");
QVERIFY(parser.rules().isEmpty());
}
};