diff options
author | Jędrzej Nowacki <jedrzej.nowacki@digia.com> | 2014-07-10 13:43:18 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@digia.com> | 2014-07-14 00:11:35 +0200 |
commit | 607462019a1da6241d3f4b6bf6356b7dc0a413d0 (patch) | |
tree | c34f680205b4309bfff5e35b6141a76718ea314a /tests | |
parent | b6bce68a64ac25489b5cca825ab6840e3fca21ee (diff) |
Speedup qDebug() << QDate(...)
We really do not need to do string parsing there.
Change-Id: Ie2277d9ff0d0445285b7108023941af111d9baca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/tools/qdate/tst_qdate.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qdate/tst_qdate.cpp b/tests/auto/corelib/tools/qdate/tst_qdate.cpp index 807dcf5cbe..97787e9cbd 100644 --- a/tests/auto/corelib/tools/qdate/tst_qdate.cpp +++ b/tests/auto/corelib/tools/qdate/tst_qdate.cpp @@ -104,6 +104,7 @@ private slots: void longMonthName() const; void standaloneLongMonthName() const; void roundtrip() const; + void qdebug() const; private: QDate defDate() const { return QDate(1900, 1, 1); } QDate invalidDate() const { return QDate(); } @@ -1476,5 +1477,13 @@ void tst_QDate::roundtrip() const } } +void tst_QDate::qdebug() const +{ + QTest::ignoreMessage(QtDebugMsg, "QDate(\"\")"); + qDebug() << QDate(); + QTest::ignoreMessage(QtDebugMsg, "QDate(\"1983-08-07\")"); + qDebug() << QDate(1983, 8, 7); +} + QTEST_APPLESS_MAIN(tst_QDate) #include "tst_qdate.moc" |