diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h index 82e961d61b..d15e432bd5 100644 --- a/src/testlib/qtest.h +++ b/src/testlib/qtest.h @@ -232,6 +232,48 @@ inline bool qCompare(QFlags const &t1, int const &t2, const char *actual, con return qCompare(int(t1), t2, actual, expected, file, line); } +template<> +inline bool qCompare(qint64 const &t1, qint32 const &t2, const char *actual, + const char *expected, const char *file, int line) +{ + return qCompare(t1, static_cast(t2), actual, expected, file, line); +} + +template<> +inline bool qCompare(qint64 const &t1, quint32 const &t2, const char *actual, + const char *expected, const char *file, int line) +{ + return qCompare(t1, static_cast(t2), actual, expected, file, line); +} + +template<> +inline bool qCompare(quint64 const &t1, quint32 const &t2, const char *actual, + const char *expected, const char *file, int line) +{ + return qCompare(t1, static_cast(t2), actual, expected, file, line); +} + +template<> +inline bool qCompare(qint32 const &t1, qint64 const &t2, const char *actual, + const char *expected, const char *file, int line) +{ + return qCompare(static_cast(t1), t2, actual, expected, file, line); +} + +template<> +inline bool qCompare(quint32 const &t1, qint64 const &t2, const char *actual, + const char *expected, const char *file, int line) +{ + return qCompare(static_cast(t1), t2, actual, expected, file, line); +} + +template<> +inline bool qCompare(quint32 const &t1, quint64 const &t2, const char *actual, + const char *expected, const char *file, int line) +{ + return qCompare(static_cast(t1), t2, actual, expected, file, line); +} + } QT_END_NAMESPACE diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index d83b05f05e..91da10fd94 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -2696,6 +2696,30 @@ bool QTest::compare_string_helper(const char *t1, const char *t2, const char *ac \internal */ +/*! \fn bool QTest::qCompare(qint64 const &t1, qint32 const &t2, const char *actual, const char *expected, const char *file, int line) + \internal +*/ + +/*! \fn bool QTest::qCompare(qint64 const &t1, quint32 const &t2, const char *actual, const char *expected, const char *file, int line) + \internal +*/ + +/*! \fn bool QTest::qCompare(quint64 const &t1, quint32 const &t2, const char *actual, const char *expected, const char *file, int line) + \internal +*/ + +/*! \fn bool QTest::qCompare(qint32 const &t1, qint64 const &t2, const char *actual, const char *expected, const char *file, int line) + \internal +*/ + +/*! \fn bool QTest::qCompare(quint32 const &t1, qint64 const &t2, const char *actual, const char *expected, const char *file, int line) + \internal +*/ + +/*! \fn bool QTest::qCompare(quint32 const &t1, quint64 const &t2, const char *actual, const char *expected, const char *file, int line) + \internal +*/ + /*! \fn bool QTest::qCompare(bool const &t1, int const &t2, const char *actual, const char *expected, const char *file, int line) \internal */