diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-10-12 16:32:29 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-10-18 13:35:45 (GMT) |
commit | ec1c89a9440cefc0ebea225d3aeca2decb56e690 (patch) | |
tree | f3ce4b2b0a05b75cd2dd08713800fae7a87566b0 /tests/auto/qimagereader | |
parent | b131badb55f7611a9ad47e2be54d6721a28d1307 (diff) | |
download | Qt-ec1c89a9440cefc0ebea225d3aeca2decb56e690.zip Qt-ec1c89a9440cefc0ebea225d3aeca2decb56e690.tar.gz Qt-ec1c89a9440cefc0ebea225d3aeca2decb56e690.tar.bz2 |
Correct errors in the qimagereader autotest
First, pgm and pbm formats need the same exception given to ppm format
as they are subtypes of the same format. (as text based image formats they
are vulnerable to line end differences)
Second, a workaround for the readFromDevice test case hanging on the symbian
emulator. The test expects to be able to send a whole image to a socket and
have this fit within the send/receive buffers of the TCP stack.
At least for the emulator's winsock backend, this hangs the autotest inside
a blocking write. On the Nokia 5800, the test passed so it's currently skipped
only for the emulator.
Reviewed-By: Jason Barron
Diffstat (limited to 'tests/auto/qimagereader')
-rw-r--r-- | tests/auto/qimagereader/tst_qimagereader.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index 4b4bdd6..a6fb886 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -1098,6 +1098,11 @@ void tst_QImageReader::readFromDevice() QCOMPARE(image1, expectedImage); } +#if defined (Q_OS_SYMBIAN) && defined (__WINS__) + //the emulator hangs in socket write (this is a test bug, it assumes the TCP stack can accept a whole image to its buffers) + if(imageData.size() > 16384) + QSKIP("image larger than socket buffer (test needs to be rewritten)", SkipSingle); +#endif Server server(imageData); QEventLoop loop; connect(&server, SIGNAL(ready()), &loop, SLOT(quit())); @@ -1249,7 +1254,10 @@ void tst_QImageReader::devicePosition() buf.seek(preLen); QImageReader reader(&buf, format); QCOMPARE(expected, reader.read()); - if (format != "ppm" && format != "gif") // Known not to work + if (format != "ppm" && + format != "pgm" && + format != "pbm" && + format != "gif") // Known not to work QCOMPARE(buf.pos(), qint64(preLen+imageDataSize)); } |