diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2018-09-16 10:27:38 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2018-12-07 18:52:25 +0000 |
commit | 9d4406f49af21a57b6df3ee8f42f682a04bd2edd (patch) | |
tree | 5b55632d9870362aa4e0eccb048d544420fb863a | |
parent | aa18467442011a8ad26ca6396c2bb44f44aba569 (diff) |
QTest: Make QCOMPARE of QCborError produce output
I was getting:
Actual (reader.validate()) : <null>
Expected (QCborError::NoError): NoError
Change-Id: Ib47c56818178458a88b4fffd1554f1751f447086
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-rw-r--r-- | src/testlib/qtest.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 <QtCore/qbytearray.h> #include <QtCore/qstring.h> #include <QtCore/qstringlist.h> +#include <QtCore/qcborcommon.h> #include <QtCore/qdatetime.h> #include <QtCore/qobject.h> #include <QtCore/qvariant.h> @@ -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(); |