summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/tiff/tst_qtiff.cpp22
-rw-r--r--tests/shared/images/tiff.qrc2
-rw-r--r--tests/shared/images/tiff/indexed_nontiled.tifbin0 -> 119486 bytes
-rw-r--r--tests/shared/images/tiff/indexed_tiled.tifbin0 -> 209220 bytes
4 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/tiff/tst_qtiff.cpp b/tests/auto/tiff/tst_qtiff.cpp
index 65cc56c..bec2ca2 100644
--- a/tests/auto/tiff/tst_qtiff.cpp
+++ b/tests/auto/tiff/tst_qtiff.cpp
@@ -81,6 +81,9 @@ private slots:
void multipage_data();
void multipage();
+ void tiled_data();
+ void tiled();
+
private:
QString prefix;
};
@@ -153,6 +156,8 @@ void tst_qtiff::readImage_data()
QTest::newRow("rgb_orientation_7") << QString("rgb_orientation_7.tiff") << QSize(64, 64);
QTest::newRow("rgb_orientation_8") << QString("rgb_orientation_8.tiff") << QSize(64, 64);
QTest::newRow("teapot") << QString("teapot.tiff") << QSize(256, 256);
+ QTest::newRow("indexed_nontiled") << QString("indexed_nontiled.tif") << QSize(512, 384);
+ QTest::newRow("indexed_tiled") << QString("indexed_tiled.tif") << QSize(512, 384);
}
void tst_qtiff::readImage()
@@ -557,5 +562,22 @@ void tst_qtiff::multipage()
QCOMPARE(reader.jumpToNextImage(), false);
}
+void tst_qtiff::tiled_data()
+{
+ QTest::addColumn<QString>("expectedFile");
+ QTest::addColumn<QString>("tiledFile");
+ QTest::newRow("Indexed") << "indexed_nontiled.tif" << "indexed_tiled.tif";
+}
+
+void tst_qtiff::tiled()
+{
+ QFETCH(QString, expectedFile);
+ QFETCH(QString, tiledFile);
+
+ QImage expectedImage(prefix + expectedFile);
+ QImage tiledImage(prefix + tiledFile);
+ QCOMPARE(expectedImage, tiledImage);
+}
+
QTEST_MAIN(tst_qtiff)
#include "tst_qtiff.moc"
diff --git a/tests/shared/images/tiff.qrc b/tests/shared/images/tiff.qrc
index c98a72c..258acf0 100644
--- a/tests/shared/images/tiff.qrc
+++ b/tests/shared/images/tiff.qrc
@@ -41,5 +41,7 @@
<file>tiff/rgb_orientation_8.tiff</file>
<file>tiff/teapot.tiff</file>
<file>tiff/colorful.bmp</file>
+ <file>tiff/indexed_tiled.tif</file>
+ <file>tiff/indexed_nontiled.tif</file>
</qresource>
</RCC>
diff --git a/tests/shared/images/tiff/indexed_nontiled.tif b/tests/shared/images/tiff/indexed_nontiled.tif
new file mode 100644
index 0000000..d0b7cef
--- /dev/null
+++ b/tests/shared/images/tiff/indexed_nontiled.tif
Binary files differ
diff --git a/tests/shared/images/tiff/indexed_tiled.tif b/tests/shared/images/tiff/indexed_tiled.tif
new file mode 100644
index 0000000..4ed11dd
--- /dev/null
+++ b/tests/shared/images/tiff/indexed_tiled.tif
Binary files differ