diff options
author | Trond Kjernåsen <trond@trolltech.com> | 2010-02-05 15:06:33 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond@trolltech.com> | 2010-02-05 15:08:53 (GMT) |
commit | 381f5ae82cccec3774b68674b4c0e782e9f49f6f (patch) | |
tree | 1e0da963652baff781eb81964d6c089c517b1161 /tests/auto/qimagereader/tst_qimagereader.cpp | |
parent | f8fa846bdcd961105674aba3666240b6ed166b04 (diff) | |
download | Qt-381f5ae82cccec3774b68674b4c0e782e9f49f6f.zip Qt-381f5ae82cccec3774b68674b4c0e782e9f49f6f.tar.gz Qt-381f5ae82cccec3774b68674b4c0e782e9f49f6f.tar.bz2 |
Fixed QGifHandler::loopCount().
Task-number: QTBUG-7037
Reviewed-by: Kim
Diffstat (limited to 'tests/auto/qimagereader/tst_qimagereader.cpp')
-rw-r--r-- | tests/auto/qimagereader/tst_qimagereader.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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 |