diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-06-16 10:32:05 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-06-16 10:32:05 (GMT) |
commit | 39d357505c7de6430f73cd5a491c2a7ddccd55ea (patch) | |
tree | a1dd8a773bdd1f685945c4c761a7bad1c9823460 /tests | |
parent | 59ec66675b725f56111e4b133e79828bc6d5d95a (diff) | |
parent | 4ae3fd65f5f832a2b6a7463eb758cc0a5819ad9d (diff) | |
download | Qt-39d357505c7de6430f73cd5a491c2a7ddccd55ea.zip Qt-39d357505c7de6430f73cd5a491c2a7ddccd55ea.tar.gz Qt-39d357505c7de6430f73cd5a491c2a7ddccd55ea.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qimagereader/tst_qimagereader.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index aadee5b..7e57973 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -138,6 +138,9 @@ private slots: void sizeBeforeRead_data(); void sizeBeforeRead(); + void sizeBeforeFormat_data(); + void sizeBeforeFormat(); + void imageFormatBeforeRead_data(); void imageFormatBeforeRead(); @@ -706,6 +709,31 @@ void tst_QImageReader::sizeBeforeRead() QCOMPARE(size, image.size()); } +void tst_QImageReader::sizeBeforeFormat_data() +{ + imageFormat_data(); +} + +void tst_QImageReader::sizeBeforeFormat() +{ + QFETCH(QString, fileName); + + QByteArray formatA, formatB; + + { + QImageReader reader(prefix + fileName); + formatA = reader.format(); + } + + { + QImageReader reader(prefix + fileName); + QSize size = reader.size(); + formatB = reader.format(); + } + + QCOMPARE(formatA, formatB); +} + void tst_QImageReader::imageFormatBeforeRead_data() { imageFormat_data(); |