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>
This commit is contained in:
Jason McDonald 2011-10-31 12:30:14 +10:00 committed by Qt by Nokia
parent be16b833a5
commit a13b24eac0

View File

@ -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));