summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2013-12-03 16:15:49 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-04 13:10:49 +0100
commit5da094c1aa21d0440a31bf09d51016b8af7de046 (patch)
tree72a15a94b0ad70793b2018b70442eceef925f719 /tests/auto/testlib/selftests
parent1ca1cec64d799db82c5320fa08f9a5340182233e (diff)
TestLib: Ignore trailing space in QTest::ignoreMessage
When comparing expected with actual debug messages, allow the expected ones to contain a trailing space. This is needed to not break all autotests in a follow up patch, which will prevent ~QDebug() from generating a trailing space by default. Task-number: QTBUG-15256 Change-Id: I7f67393ddfbfe37fde1ca5ef45e4ad7f4b5324b4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
Diffstat (limited to 'tests/auto/testlib/selftests')
-rw-r--r--tests/auto/testlib/selftests/warnings/tst_warnings.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/testlib/selftests/warnings/tst_warnings.cpp b/tests/auto/testlib/selftests/warnings/tst_warnings.cpp
index ff4357f11f..4e3620caab 100644
--- a/tests/auto/testlib/selftests/warnings/tst_warnings.cpp
+++ b/tests/auto/testlib/selftests/warnings/tst_warnings.cpp
@@ -82,6 +82,10 @@ void tst_Warnings::testWarnings()
qWarning("Babablabla");
qDebug("Bubublabla");
qWarning("Babablabla");
+
+ // accept redundant space at end to keep compatibility with Qt < 5.2
+ QTest::ignoreMessage(QtDebugMsg, "Bubu ");
+ qDebug() << "Bubu";
}
void tst_Warnings::testMissingWarnings()