diff options
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r-- | tests/auto/corelib/io/qdebug/tst_qdebug.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp index 772fd9fd04..f33a7eef5a 100644 --- a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp +++ b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp @@ -54,6 +54,7 @@ private slots: void debugWithQBool() const; void veryLongWarningMessage() const; void qDebugQStringRef() const; + void defaultMessagehandler() const; }; void tst_QDebug::assignment() const @@ -154,5 +155,16 @@ void tst_QDebug::qDebugQStringRef() const } } +void tst_QDebug::defaultMessagehandler() const +{ + QtMsgHandler defaultMessageHandler1 = qInstallMsgHandler(0); + QtMsgHandler defaultMessageHandler2 = qInstallMsgHandler(myMessageHandler); + bool same = (*defaultMessageHandler1 == *defaultMessageHandler2); + QVERIFY(same); + QtMsgHandler messageHandler = qInstallMsgHandler(0); + same = (*messageHandler == *myMessageHandler); + QVERIFY(same); +} + QTEST_MAIN(tst_QDebug); #include "tst_qdebug.moc" |