diff --git a/test/cpputilstestutils.h b/test/cpputilstestutils.h index 2a4299d..a4da67c 100644 --- a/test/cpputilstestutils.h +++ b/test/cpputilstestutils.h @@ -5,6 +5,14 @@ Q_DECLARE_METATYPE(std::string) +#define DECLARE_QDEBUG_OP_FOR_ENUM(Namespace, EnumName) \ + QDebug operator<<(QDebug debug, EnumName val) \ + { \ + QDebugStateSaver saver(debug); \ + debug.nospace() << #EnumName "(" << Namespace toString(val).c_str() << ')'; \ + return debug; \ + } + // only needed if there is a nameclash between std::string *::toString(const T &) and template char *QTest::toString(const T &) #define FIXEDCOMPARE(actual, expected) \ do {\