summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-10-31 12:30:14 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-31 06:58:15 +0100
commita13b24eac09fec5da41fec63c8db986e7121d1c6 (patch)
tree9332a900864b60033e74296cd39789192546f22c
parentbe16b833a5a017e4a93f27e8e9c56afced555a8d (diff)
Improve QBuffer autotest
The documentation of QIODevice::pos() states: "For sequential devices or closed devices, where there is no concept of a "current position", 0 is returned". The test had a disabled check for a position of -1 before the device is opened. Make the test agree with the documentation. Change-Id: Ide5729bfc825cdb84caf4851574a57d3ef42ccb2 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
-rw-r--r--tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
index bf4842ff94..0306323b5a 100644
--- a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
+++ b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
@@ -328,9 +328,8 @@ void tst_QBuffer::seekTest()
QByteArray ba;
QBuffer buf(&ba);
-#if 0
- QCOMPARE(buf.pos(), qint64(-1));
-#endif
+ QCOMPARE(buf.pos(), qint64(0));
+
buf.open(QIODevice::ReadWrite);
QCOMPARE(buf.pos(), qint64(0));