summaryrefslogtreecommitdiffstats
path: root/tests/auto/qudpsocket
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-01-04 13:32:39 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-01-04 13:45:15 (GMT)
commita47e2de1a3958c52eef1997c448bf89d3aba63e5 (patch)
tree46f0ed077cd2a72e9ab67163c4b2e3c262e8ecce /tests/auto/qudpsocket
parent35cb81f92164bb136dc49b1ce7ebd76e6a79b289 (diff)
downloadQt-a47e2de1a3958c52eef1997c448bf89d3aba63e5.zip
Qt-a47e2de1a3958c52eef1997c448bf89d3aba63e5.tar.gz
Qt-a47e2de1a3958c52eef1997c448bf89d3aba63e5.tar.bz2
Remove TEST_QNETWORK_PROXY define from the tests
We always test the proxies now. Reviewed-by: Thiago
Diffstat (limited to 'tests/auto/qudpsocket')
-rw-r--r--tests/auto/qudpsocket/test/test.pro1
-rw-r--r--tests/auto/qudpsocket/tst_qudpsocket.cpp18
2 files changed, 1 insertions, 18 deletions
diff --git a/tests/auto/qudpsocket/test/test.pro b/tests/auto/qudpsocket/test/test.pro
index 2e0a020..44d3d30 100644
--- a/tests/auto/qudpsocket/test/test.pro
+++ b/tests/auto/qudpsocket/test/test.pro
@@ -3,7 +3,6 @@ SOURCES += ../tst_qudpsocket.cpp
QT = core network
MOC_DIR=tmp
-DEFINES += TEST_QNETWORK_PROXY
win32 {
CONFIG(debug, debug|release) {
diff --git a/tests/auto/qudpsocket/tst_qudpsocket.cpp b/tests/auto/qudpsocket/tst_qudpsocket.cpp
index 160d74c..e3ab9bc 100644
--- a/tests/auto/qudpsocket/tst_qudpsocket.cpp
+++ b/tests/auto/qudpsocket/tst_qudpsocket.cpp
@@ -49,10 +49,7 @@
#include <qhostaddress.h>
#include <qhostinfo.h>
#include <qmap.h>
-#ifdef TEST_QNETWORK_PROXY
-# include <QNetworkProxy>
-#endif
-
+#include <QNetworkProxy>
#include <qstringlist.h>
#include "../network-settings.h"
@@ -118,32 +115,23 @@ void tst_QUdpSocket::initTestCase_data()
QTest::addColumn<int>("proxyType");
QTest::newRow("WithoutProxy") << false << 0;
-#ifdef TEST_QNETWORK_PROXY
QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
-#endif
}
void tst_QUdpSocket::init()
{
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QFETCH_GLOBAL(int, proxyType);
if (proxyType == QNetworkProxy::Socks5Proxy) {
QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080));
}
-#endif
}
}
void tst_QUdpSocket::cleanup()
{
- QFETCH_GLOBAL(bool, setProxy);
- if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy);
-#endif
- }
}
@@ -204,12 +192,10 @@ void tst_QUdpSocket::broadcasting()
{
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QFETCH_GLOBAL(int, proxyType);
if (proxyType == QNetworkProxy::Socks5Proxy) {
QSKIP("With socks5 Broadcast is not supported.", SkipSingle);
}
-#endif
}
#ifdef Q_OS_AIX
QSKIP("Broadcast does not work on darko", SkipAll);
@@ -539,12 +525,10 @@ void tst_QUdpSocket::bindMode()
{
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
-#ifdef TEST_QNETWORK_PROXY
QFETCH_GLOBAL(int, proxyType);
if (proxyType == QNetworkProxy::Socks5Proxy) {
QSKIP("With socks5 explicit port binding is not supported.", SkipAll);
}
-#endif
}
QUdpSocket socket;