From 9d4406f49af21a57b6df3ee8f42f682a04bd2edd Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 16 Sep 2018 10:27:38 -0700 Subject: QTest: Make QCOMPARE of QCborError produce output I was getting: Actual (reader.validate()) : Expected (QCborError::NoError): NoError Change-Id: Ib47c56818178458a88b4fffd1554f1751f447086 Reviewed-by: Edward Welbourne --- src/testlib/qtest.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/testlib/qtest.h') diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h index 2578037946..28b62129b6 100644 --- a/src/testlib/qtest.h +++ b/src/testlib/qtest.h @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -110,6 +111,12 @@ template<> inline char *toString(const QDateTime &dateTime) } #endif // datestring +template<> inline char *toString(const QCborError &c) +{ + // use the Q_ENUM formatting + return toString(c.c); +} + template<> inline char *toString(const QChar &c) { const ushort uc = c.unicode(); -- cgit v1.2.3