summaryrefslogtreecommitdiffstats
path: root/tests/auto/qimagewriter/tst_qimagewriter.cpp
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2009-05-20 08:21:11 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2009-05-20 08:25:07 (GMT)
commitba71f22dbee3e5bd4e0db0054b8ba57bde89d224 (patch)
treed4eb04d06ead8951e537bd7f0414944b20ece1c1 /tests/auto/qimagewriter/tst_qimagewriter.cpp
parentc51204359b7c9c2e63e4101f771d07774b921fee (diff)
downloadQt-ba71f22dbee3e5bd4e0db0054b8ba57bde89d224.zip
Qt-ba71f22dbee3e5bd4e0db0054b8ba57bde89d224.tar.gz
Qt-ba71f22dbee3e5bd4e0db0054b8ba57bde89d224.tar.bz2
Refactor the qimagereader autotest to work with shadow build
Refactor the test of QImageReader to work with shadow build. Add two tests for the TIFF format Fix an error of the test of QImageWriter that prevented the cleaning of the created files after the test. Reviewed-by: Olivier
Diffstat (limited to 'tests/auto/qimagewriter/tst_qimagewriter.cpp')
-rw-r--r--tests/auto/qimagewriter/tst_qimagewriter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qimagewriter/tst_qimagewriter.cpp b/tests/auto/qimagewriter/tst_qimagewriter.cpp
index 70d9e70..349afa5 100644
--- a/tests/auto/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/qimagewriter/tst_qimagewriter.cpp
@@ -165,7 +165,7 @@ tst_QImageWriter::tst_QImageWriter()
tst_QImageWriter::~tst_QImageWriter()
{
- QDir dir(prefix + QLatin1String("images"));
+ QDir dir(prefix);
QStringList filesToDelete = dir.entryList(QStringList() << "gen-*" , QDir::NoDotAndDotDot | QDir::Files);
foreach( QString file, filesToDelete) {
QFile::remove(dir.absoluteFilePath(file));
@@ -445,13 +445,13 @@ void tst_QImageWriter::supportsOption_data()
QTest::addColumn<QString>("fileName");
QTest::addColumn<QIntList>("options");
- QTest::newRow("png") << QString(prefix + "gen-black.png")
+ QTest::newRow("png") << QString("gen-black.png")
<< (QIntList() << QImageIOHandler::Gamma
<< QImageIOHandler::Description
<< QImageIOHandler::Quality
<< QImageIOHandler::Size);
#if defined QTEST_HAVE_TIFF
- QTest::newRow("tiff") << QString("images/gen-black.tiff")
+ QTest::newRow("tiff") << QString("gen-black.tiff")
<< (QIntList() << QImageIOHandler::Size
<< QImageIOHandler::CompressionRatio);
#endif
@@ -478,7 +478,7 @@ void tst_QImageWriter::supportsOption()
<< QImageIOHandler::Animation
<< QImageIOHandler::BackgroundColor;
- QImageWriter writer(fileName);
+ QImageWriter writer(prefix + fileName);
for (int i = 0; i < options.size(); ++i) {
QVERIFY(writer.supportsOption(QImageIOHandler::ImageOption(options.at(i))));
allOptions.remove(QImageIOHandler::ImageOption(options.at(i)));