diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp | 8 | ||||
-rw-r--r-- | tests/auto/other/toolsupport/tst_toolsupport.cpp | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp index 2253173d08..8d5a4055b8 100644 --- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp +++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp @@ -114,6 +114,8 @@ void tst_QIODevice::constructing_QTcpSocket() socket.connectToHost(QtNetworkSettings::serverName(), 143); QVERIFY(socket.waitForConnected(30000)); QVERIFY(device->isOpen()); + QCOMPARE(device->readChannelCount(), 1); + QCOMPARE(device->writeChannelCount(), 1); while (!device->canReadLine()) QVERIFY(device->waitForReadyRead(30000)); @@ -125,6 +127,8 @@ void tst_QIODevice::constructing_QTcpSocket() QCOMPARE(socket.pos(), qlonglong(0)); socket.close(); + QCOMPARE(socket.readChannelCount(), 0); + QCOMPARE(socket.writeChannelCount(), 0); socket.connectToHost(QtNetworkSettings::serverName(), 143); QVERIFY(socket.waitForConnected(30000)); QVERIFY(device->isOpen()); @@ -158,6 +162,8 @@ void tst_QIODevice::constructing_QFile() QVERIFY(file.open(QFile::ReadOnly)); QVERIFY(device->isOpen()); QCOMPARE((int) device->openMode(), (int) QFile::ReadOnly); + QCOMPARE(device->readChannelCount(), 1); + QCOMPARE(device->writeChannelCount(), 0); char buf[1024]; memset(buf, 0, sizeof(buf)); @@ -576,6 +582,8 @@ void tst_QIODevice::readAllKeepPosition() buffer.open(QIODevice::ReadOnly); char c; + QCOMPARE(buffer.readChannelCount(), 1); + QCOMPARE(buffer.writeChannelCount(), 0); QVERIFY(buffer.getChar(&c)); QCOMPARE(buffer.pos(), qint64(0)); buffer.ungetChar(c); diff --git a/tests/auto/other/toolsupport/tst_toolsupport.cpp b/tests/auto/other/toolsupport/tst_toolsupport.cpp index 93cbb2809d..518d3947ab 100644 --- a/tests/auto/other/toolsupport/tst_toolsupport.cpp +++ b/tests/auto/other/toolsupport/tst_toolsupport.cpp @@ -124,7 +124,7 @@ void tst_toolsupport::offsets_data() { QTestData &data = QTest::newRow("QFilePrivate::fileName") << pmm_to_offsetof(&QFilePrivate::fileName); - data << 184 << 256; + data << 188 << 272; } #endif |