summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsocks5socketengine
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/qsocks5socketengine
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/qsocks5socketengine')
-rw-r--r--tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
index 8f0cbc3..9da7197 100644
--- a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
+++ b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
@@ -336,7 +336,7 @@ void tst_QSocks5SocketEngine::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
QByteArray array2 = "XXXX LOGOUT\r\n";
@@ -596,7 +596,7 @@ void tst_QSocks5SocketEngine::tcpSocketBlockingTest()
// Read greeting
QVERIFY(socket.waitForReadyRead(5000));
QString s = socket.readLine();
- QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData());
+ QVERIFY2(QtNetworkSettings::compareReplyIMAP(s.toLatin1()), s.toLatin1().constData());
// Write NOOP
QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8);
@@ -671,8 +671,8 @@ void tst_QSocks5SocketEngine::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();
@@ -859,7 +859,7 @@ void tst_QSocks5SocketEngine::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
QByteArray array2 = "XXXX LOGOUT\r\n";
@@ -927,7 +927,7 @@ void tst_QSocks5SocketEngine::passwordAuth2()
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
QByteArray array2 = "XXXX LOGOUT\r\n";