summaryrefslogtreecommitdiffstats
path: root/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2011-01-06 03:39:14 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2011-01-10 00:36:06 (GMT)
commit026a24855ec16626ab101007719a836f5a4e3c47 (patch)
tree73331d0c48023ed9f5489735443d2b56b3d67736 /tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
parente6286c54bd66c2db06687127fea69fcc398ffbde (diff)
downloadQt-026a24855ec16626ab101007719a836f5a4e3c47.zip
Qt-026a24855ec16626ab101007719a836f5a4e3c47.tar.gz
Qt-026a24855ec16626ab101007719a836f5a4e3c47.tar.bz2
network tests: make IMAP, FTP testdata more flexible.
Move all hardcoded IMAP/FTP fixtures into network-settings.h. Make it work with new and old network test server. Reviewed-by: Markus Goetz Task: QTBUG-15114
Diffstat (limited to 'tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp')
-rw-r--r--tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
index f86ba63..972185b 100644
--- a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
+++ b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
@@ -325,7 +325,7 @@ void tst_QHttpSocketEngine::simpleConnectToIMAP()
QVERIFY(socketDevice.read(array.data(), array.size()) == available);
// Check that the greeting is what we expect it to be
- QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
+ QVERIFY2(QtNetworkSettings::compareReplyIMAP(array), array.constData());
// Write a logout message
@@ -455,7 +455,7 @@ void tst_QHttpSocketEngine::tcpSocketBlockingTest()
// Read greeting
QVERIFY(socket.waitForReadyRead(5000));
QString s = socket.readLine();
- QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData());
+ QVERIFY2(QtNetworkSettings::compareReplyIMAP(s.toLatin1()), qPrintable(s));
// Write NOOP
QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8);
@@ -530,8 +530,8 @@ void tst_QHttpSocketEngine::tcpSocketNonBlockingTest()
// Read greeting
QVERIFY(!tcpSocketNonBlocking_data.isEmpty());
- QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(),
- QtNetworkSettings::expectedReplyIMAP().constData());
+ QByteArray data = tcpSocketNonBlocking_data.at(0).toLatin1();
+ QVERIFY2(QtNetworkSettings::compareReplyIMAP(data), data.constData());
tcpSocketNonBlocking_data.clear();
@@ -713,7 +713,7 @@ void tst_QHttpSocketEngine::passwordAuth()
QVERIFY(socketDevice.read(array.data(), array.size()) == available);
// Check that the greeting is what we expect it to be
- QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
+ QVERIFY2(QtNetworkSettings::compareReplyIMAP(array), array.constData());
// Write a logout message