diff options
Diffstat (limited to 'tests/auto/gui/image')
-rw-r--r-- | tests/auto/gui/image/qimagereader/tst_qimagereader.cpp | 7 | ||||
-rw-r--r-- | tests/auto/gui/image/qmovie/tst_qmovie.cpp | 9 |
2 files changed, 12 insertions, 4 deletions
diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp index f6ffd7b7c5..22d96e76f9 100644 --- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp @@ -1890,9 +1890,8 @@ void tst_QImageReader::saveFormat() void tst_QImageReader::saveColorSpace_data() { - QTest::addColumn<QColorSpace::ColorSpaceId>("colorspaceId"); + QTest::addColumn<QColorSpace::NamedColorSpace>("namedColorSpace"); - QTest::newRow("Undefined") << QColorSpace::Undefined; QTest::newRow("sRGB") << QColorSpace::SRgb; QTest::newRow("sRGB(linear)") << QColorSpace::SRgbLinear; QTest::newRow("AdobeRGB") << QColorSpace::AdobeRgb; @@ -1902,11 +1901,11 @@ void tst_QImageReader::saveColorSpace_data() void tst_QImageReader::saveColorSpace() { - QFETCH(QColorSpace::ColorSpaceId, colorspaceId); + QFETCH(QColorSpace::NamedColorSpace, namedColorSpace); QImage orig(":/images/kollada.png"); - orig.setColorSpace(colorspaceId); + orig.setColorSpace(namedColorSpace); QBuffer buf; buf.open(QIODevice::WriteOnly); QVERIFY(orig.save(&buf, "png")); diff --git a/tests/auto/gui/image/qmovie/tst_qmovie.cpp b/tests/auto/gui/image/qmovie/tst_qmovie.cpp index 4e9e9b8115..c8217b2cec 100644 --- a/tests/auto/gui/image/qmovie/tst_qmovie.cpp +++ b/tests/auto/gui/image/qmovie/tst_qmovie.cpp @@ -62,6 +62,7 @@ private slots: #ifndef QT_NO_WIDGETS void infiniteLoop(); #endif + void emptyMovie(); }; // Testing get/set functions @@ -220,5 +221,13 @@ void tst_QMovie::infiniteLoop() } #endif +void tst_QMovie::emptyMovie() +{ + QMovie movie; + movie.setCacheMode(QMovie::CacheAll); + movie.jumpToFrame(100); + QCOMPARE(movie.currentFrameNumber(), -1); +} + QTEST_MAIN(tst_QMovie) #include "tst_qmovie.moc" |