diff options
Diffstat (limited to 'src/testlib/qtest_gui.h')
-rw-r--r-- | src/testlib/qtest_gui.h | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/src/testlib/qtest_gui.h b/src/testlib/qtest_gui.h index d39e943926..f10ddd8473 100644 --- a/src/testlib/qtest_gui.h +++ b/src/testlib/qtest_gui.h @@ -100,31 +100,29 @@ inline bool qCompare(QImage const &t1, QImage const &t2, const bool t2Null = t2.isNull(); if (t1Null != t2Null) { qsnprintf(msg, 1024, "Compared QImages differ.\n" - " Actual (%s).isNull() : %d\n" + " Actual (%s).isNull(): %d\n" " Expected (%s).isNull(): %d", actual, t1Null, expected, t2Null); - return compare_helper(false, msg, file, line); + return compare_helper(false, msg, 0, 0, actual, expected, file, line); } if (t1Null && t2Null) - return compare_helper(true, "COMPARE()", file, line); + return compare_helper(true, 0, 0, 0, actual, expected, file, line); if (t1.width() != t2.width() || t2.height() != t2.height()) { qsnprintf(msg, 1024, "Compared QImages differ in size.\n" - " Actual (%s) : %dx%d\n" + " Actual (%s): %dx%d\n" " Expected (%s): %dx%d", actual, t1.width(), t1.height(), expected, t2.width(), t2.height()); - return compare_helper(false, msg, file, line); + return compare_helper(false, msg, 0, 0, actual, expected, file, line); } if (t1.format() != t2.format()) { qsnprintf(msg, 1024, "Compared QImages differ in format.\n" - " Actual (%s) : %d\n" + " Actual (%s): %d\n" " Expected (%s): %d", actual, t1.format(), expected, t2.format()); - return compare_helper(false, msg, file, line); + return compare_helper(false, msg, 0, 0, actual, expected, file, line); } - return (t1 == t2) - ? compare_helper(true, "COMPARE()", file, line) - : compare_helper(false, "Compared values are not the same", - toString(t1), toString(t2), actual, expected, file, line); + return compare_helper(t1 == t2, "Compared values are not the same", + toString(t1), toString(t2), actual, expected, file, line); } #ifndef QTEST_NO_SPECIALIZATIONS @@ -139,19 +137,19 @@ inline bool qCompare(QPixmap const &t1, QPixmap const &t2, const char *actual, c const bool t2Null = t2.isNull(); if (t1Null != t2Null) { qsnprintf(msg, 1024, "Compared QPixmaps differ.\n" - " Actual (%s).isNull() : %d\n" + " Actual (%s).isNull(): %d\n" " Expected (%s).isNull(): %d", actual, t1Null, expected, t2Null); - return compare_helper(false, msg, file, line); + return compare_helper(false, msg, 0, 0, actual, expected, file, line); } if (t1Null && t2Null) - return compare_helper(true, "COMPARE()", file, line); + return compare_helper(true, 0, 0, 0, actual, expected, file, line); if (t1.width() != t2.width() || t2.height() != t2.height()) { qsnprintf(msg, 1024, "Compared QPixmaps differ in size.\n" - " Actual (%s) : %dx%d\n" + " Actual (%s): %dx%d\n" " Expected (%s): %dx%d", actual, t1.width(), t1.height(), expected, t2.width(), t2.height()); - return compare_helper(false, msg, file, line); + return compare_helper(false, msg, 0, 0, actual, expected, file, line); } return qCompare(t1.toImage(), t2.toImage(), actual, expected, file, line); } |