summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/expected_cmptest.txt
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-12-19 11:33:07 +0100
committerQt by Nokia <qt-info@nokia.com>2011-12-21 22:59:28 +0100
commitbc8f25c7e6ab73441c46ea41362a054843b42ec3 (patch)
treebdb3157531f5471be1e319af6ab4a0bda9df0678 /tests/auto/testlib/selftests/expected_cmptest.txt
parent5d4acbab0e243aa944f9b365fb6d72073bb1da70 (diff)
QTestlib: Make QImage comparison more verbose.
Introduce a specialization for qCompare(QImage,QImage) that checks isNull, size and format and outputs verbose messages. Check isNull, size similarly for QPixmap. Add an autotest: - Add test to cmptest and make it a GUI application since QImage requires QGuiApplication. - Make testlib/selftests capable of running X11-GUI applications by passing DISPLAY. - Ignore stderr output for cmptest - Add test data Change-Id: I2b29c7822fbeedf2b22c90889739ed7ff859ce92 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Diffstat (limited to 'tests/auto/testlib/selftests/expected_cmptest.txt')
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.txt52
1 files changed, 42 insertions, 10 deletions
diff --git a/tests/auto/testlib/selftests/expected_cmptest.txt b/tests/auto/testlib/selftests/expected_cmptest.txt
index f7dc5cfed3..36a4995d91 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.txt
+++ b/tests/auto/testlib/selftests/expected_cmptest.txt
@@ -6,39 +6,71 @@ PASS : tst_Cmptest::compare_pointerfuncs()
FAIL! : tst_Cmptest::compare_tostring(int, string) Compared values are not the same
Actual (actual): QVariant(int,123)
Expected (expected): QVariant(QString,hi)
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(122)]
+ Loc: [tst_cmptest.cpp(214)]
FAIL! : tst_Cmptest::compare_tostring(null hash, invalid) Compared values are not the same
Actual (actual): QVariant(QVariantHash)
Expected (expected): QVariant()
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(122)]
+ Loc: [tst_cmptest.cpp(214)]
FAIL! : tst_Cmptest::compare_tostring(string, null user type) Compared values are not the same
Actual (actual): QVariant(QString,A simple string)
Expected (expected): QVariant(PhonyClass)
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(122)]
+ Loc: [tst_cmptest.cpp(214)]
FAIL! : tst_Cmptest::compare_tostring(both non-null user type) Compared values are not the same
Actual (actual): QVariant(PhonyClass,<value not representable as string>)
Expected (expected): QVariant(PhonyClass,<value not representable as string>)
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(122)]
+ Loc: [tst_cmptest.cpp(214)]
FAIL! : tst_Cmptest::compareQStringLists(last item different) Compared QStringLists differ at index 2.
Actual (opA) : 'string3'
Expected (opB) : 'DIFFERS'
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/alive/tst_alive.cpp(68)]
+ Loc: [tst_cmptest.cpp(308)]
FAIL! : tst_Cmptest::compareQStringLists(second-last item different) Compared QStringLists differ at index 2.
Actual (opA) : 'string3'
Expected (opB) : 'DIFFERS'
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/alive/tst_alive.cpp(68)]
+ Loc: [tst_cmptest.cpp(308)]
FAIL! : tst_Cmptest::compareQStringLists(prefix) Compared QStringLists have different sizes.
Actual (opA) size : '2'
Expected (opB) size: '1'
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/alive/tst_alive.cpp(68)]
+ Loc: [tst_cmptest.cpp(308)]
FAIL! : tst_Cmptest::compareQStringLists(short list second) Compared QStringLists have different sizes.
Actual (opA) size : '12'
Expected (opB) size: '1'
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/alive/tst_alive.cpp(68)]
+ Loc: [tst_cmptest.cpp(308)]
FAIL! : tst_Cmptest::compareQStringLists(short list first) Compared QStringLists have different sizes.
Actual (opA) size : '1'
Expected (opB) size: '12'
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/alive/tst_alive.cpp(68)]
+ Loc: [tst_cmptest.cpp(308)]
+FAIL! : tst_Cmptest::compareQPixmaps(one null) Compared QPixmaps differ.
+ Actual (opA).isNull() : 1
+ Expected (opB).isNull(): 0
+ Loc: [tst_cmptest.cpp(333)]
+FAIL! : tst_Cmptest::compareQPixmaps(other null) Compared QPixmaps differ.
+ Actual (opA).isNull() : 0
+ Expected (opB).isNull(): 1
+ Loc: [tst_cmptest.cpp(333)]
+FAIL! : tst_Cmptest::compareQPixmaps(different size) Compared QPixmaps differ in size.
+ Actual (opA) : 11x20
+ Expected (opB): 20x20
+ Loc: [tst_cmptest.cpp(333)]
+FAIL! : tst_Cmptest::compareQPixmaps(different pixels) Compared values are not the same
+ Loc: [tst_cmptest.cpp(333)]
+FAIL! : tst_Cmptest::compareQImages(one null) Compared QImages differ.
+ Actual (opA).isNull() : 1
+ Expected (opB).isNull(): 0
+ Loc: [tst_cmptest.cpp(360)]
+FAIL! : tst_Cmptest::compareQImages(other null) Compared QImages differ.
+ Actual (opA).isNull() : 0
+ Expected (opB).isNull(): 1
+ Loc: [tst_cmptest.cpp(360)]
+FAIL! : tst_Cmptest::compareQImages(different size) Compared QImages differ in size.
+ Actual (opA) : 11x20
+ Expected (opB): 20x20
+ Loc: [tst_cmptest.cpp(360)]
+FAIL! : tst_Cmptest::compareQImages(different format) Compared QImages differ in format.
+ Actual (opA) : 6
+ Expected (opB): 3
+ Loc: [tst_cmptest.cpp(360)]
+FAIL! : tst_Cmptest::compareQImages(different pixels) Compared values are not the same
+ Loc: [tst_cmptest.cpp(360)]
PASS : tst_Cmptest::cleanupTestCase()
-Totals: 4 passed, 9 failed, 0 skipped
+Totals: 4 passed, 18 failed, 0 skipped
********* Finished testing of tst_Cmptest *********