diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qimagereader/images/qt-gif-anim.gif | bin | 0 -> 1661 bytes | |||
-rw-r--r-- | tests/auto/qimagereader/images/qt-gif-noanim.gif | bin | 0 -> 1642 bytes | |||
-rw-r--r-- | tests/auto/qimagereader/qimagereader.qrc | 4 | ||||
-rw-r--r-- | tests/auto/qimagereader/tst_qimagereader.cpp | 14 |
4 files changed, 17 insertions, 1 deletions
diff --git a/tests/auto/qimagereader/images/qt-gif-anim.gif b/tests/auto/qimagereader/images/qt-gif-anim.gif Binary files differnew file mode 100644 index 0000000..8bca4a8 --- /dev/null +++ b/tests/auto/qimagereader/images/qt-gif-anim.gif diff --git a/tests/auto/qimagereader/images/qt-gif-noanim.gif b/tests/auto/qimagereader/images/qt-gif-noanim.gif Binary files differnew file mode 100644 index 0000000..b6a8540 --- /dev/null +++ b/tests/auto/qimagereader/images/qt-gif-noanim.gif diff --git a/tests/auto/qimagereader/qimagereader.qrc b/tests/auto/qimagereader/qimagereader.qrc index 58f2f74..bc48244 100644 --- a/tests/auto/qimagereader/qimagereader.qrc +++ b/tests/auto/qimagereader/qimagereader.qrc @@ -1,5 +1,5 @@ <RCC> - <qresource prefix="/" > + <qresource prefix="/"> <file>images/16bpp.bmp</file> <file>images/4bpp-rle.bmp</file> <file>images/YCbCr_cmyk.jpg</file> @@ -59,5 +59,7 @@ <file>images/qt8.gif</file> <file>images/endless-anim.gif</file> <file>images/four-frames.gif</file> + <file>images/qt-gif-anim.gif</file> + <file>images/qt-gif-noanim.gif</file> </qresource> </RCC> diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index 3e40527..121a8fa 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -142,6 +142,7 @@ private slots: void gifHandlerBugs(); void animatedGif(); void gifImageCount(); + void gifLoopCount(); #endif void readCorruptImage_data(); @@ -884,6 +885,19 @@ void tst_QImageReader::gifImageCount() QVERIFY(io.size() == QSize(128,64)); } } + +void tst_QImageReader::gifLoopCount() +{ + { + QImageReader io(":images/qt-gif-anim.gif"); + QCOMPARE(io.loopCount(), -1); // infinite loop + } + { + QImageReader io(":images/qt-gif-noanim.gif"); + QCOMPARE(io.loopCount(), 0); // no loop + } +} + #endif class Server : public QObject |