diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-12-19 11:33:07 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-21 22:59:28 +0100 |
commit | bc8f25c7e6ab73441c46ea41362a054843b42ec3 (patch) | |
tree | bdb3157531f5471be1e319af6ab4a0bda9df0678 /tests/auto/testlib/selftests/expected_cmptest.xunitxml | |
parent | 5d4acbab0e243aa944f9b365fb6d72073bb1da70 (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.xunitxml')
-rw-r--r-- | tests/auto/testlib/selftests/expected_cmptest.xunitxml | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/tests/auto/testlib/selftests/expected_cmptest.xunitxml b/tests/auto/testlib/selftests/expected_cmptest.xunitxml index aa765a65e0..00f5f7f480 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.xunitxml +++ b/tests/auto/testlib/selftests/expected_cmptest.xunitxml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<testsuite errors="0" failures="9" tests="6" name="tst_Cmptest"> +<testsuite errors="0" failures="18" tests="8" name="tst_Cmptest"> <properties> <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/> <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/> @@ -38,6 +38,33 @@ Actual (opA) size : '1' Expected (opB) size: '12'" result="fail"/> </testcase> + <testcase result="fail" name="compareQPixmaps"> + <failure tag="one null" message="Compared QPixmaps differ. + Actual (opA).isNull() : 1 + Expected (opB).isNull(): 0" result="fail"/> + <failure tag="other null" message="Compared QPixmaps differ. + Actual (opA).isNull() : 0 + Expected (opB).isNull(): 1" result="fail"/> + <failure tag="different size" message="Compared QPixmaps differ in size. + Actual (opA) : 11x20 + Expected (opB): 20x20" result="fail"/> + <failure tag="different pixels" message="Compared values are not the same" result="fail"/> + </testcase> + <testcase result="fail" name="compareQImages"> + <failure tag="one null" message="Compared QImages differ. + Actual (opA).isNull() : 1 + Expected (opB).isNull(): 0" result="fail"/> + <failure tag="other null" message="Compared QImages differ. + Actual (opA).isNull() : 0 + Expected (opB).isNull(): 1" result="fail"/> + <failure tag="different size" message="Compared QImages differ in size. + Actual (opA) : 11x20 + Expected (opB): 20x20" result="fail"/> + <failure tag="different format" message="Compared QImages differ in format. + Actual (opA) : 6 + Expected (opB): 3" result="fail"/> + <failure tag="different pixels" message="Compared values are not the same" result="fail"/> + </testcase> <testcase result="pass" name="cleanupTestCase"/> <system-err/> </testsuite> |