summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-02-20 14:26:00 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-20 19:51:41 +0100
commita0587f79e55e6291f302be5f62fc2ce22da08e91 (patch)
tree5bf5e54cbd478459228628e81cbba70578f4ca60 /tests
parent2b50e205780f007dd5c2955cd7d492d3f5f909b1 (diff)
Silence warnings/debug output from qobject tests
They create noise in the test results. Change-Id: I40e7239ba7cd41bec577fe8220c86476553a6502 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index 8f4203a216..a6ad1d53bc 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -3186,6 +3186,14 @@ void tst_QObject::dumpObjectInfo()
QObject a, b;
QObject::connect(&a, SIGNAL(destroyed(QObject *)), &b, SLOT(deleteLater()));
a.disconnect(&b);
+#ifdef QT_DEBUG
+ QTest::ignoreMessage(QtDebugMsg, "OBJECT QObject::unnamed");
+ QTest::ignoreMessage(QtDebugMsg, " SIGNALS OUT");
+ QTest::ignoreMessage(QtDebugMsg, " signal: destroyed(QObject*)");
+ QTest::ignoreMessage(QtDebugMsg, " <Disconnected receiver>");
+ QTest::ignoreMessage(QtDebugMsg, " SIGNALS IN");
+ QTest::ignoreMessage(QtDebugMsg, " <None>");
+#endif
a.dumpObjectInfo(); // should not crash
}
@@ -3813,12 +3821,18 @@ void tst_QObject::sameName()
c2.emitSignal1();
QCOMPARE(c1.s, 2);
+#ifndef QT_NO_DEBUG
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::indexOfSignal: signal aPublicSlot() from SenderObject redefined in ConfusingObject");
+#endif
QVERIFY(connect(&c2, SIGNAL(aPublicSlot()), &c1, SLOT(signal1())));
c2.aPublicSlot();
QCOMPARE(c2.aPublicSlotCalled, 0);
QCOMPARE(c1.aPublicSlotCalled, 0);
QCOMPARE(c1.s, 3);
+#ifndef QT_NO_DEBUG
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::indexOfSignal: signal aPublicSlot() from SenderObject redefined in ConfusingObject");
+#endif
QVERIFY(connect(&c2, SIGNAL(aPublicSlot()), &c1, SLOT(aPublicSlot())));
c2.aPublicSlot();
QCOMPARE(c2.aPublicSlotCalled, 0);