summaryrefslogtreecommitdiffstats
path: root/tests/auto/qhostinfo/tst_qhostinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qhostinfo/tst_qhostinfo.cpp')
-rw-r--r--tests/auto/qhostinfo/tst_qhostinfo.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/tests/auto/qhostinfo/tst_qhostinfo.cpp b/tests/auto/qhostinfo/tst_qhostinfo.cpp
index 0c5bc59..c3aca7a 100644
--- a/tests/auto/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/qhostinfo/tst_qhostinfo.cpp
@@ -87,6 +87,8 @@
# endif
#endif
+#include "../network-settings.h"
+
//TESTED_CLASS=
//TESTED_FILES=
@@ -160,10 +162,11 @@ void tst_QHostInfo::staticInformation()
tst_QHostInfo::tst_QHostInfo()
{
+ Q_SET_DEFAULT_IAP
}
tst_QHostInfo::~tst_QHostInfo()
-{
+{
}
void tst_QHostInfo::initTestCase()
@@ -212,14 +215,21 @@ void tst_QHostInfo::lookupIPv4_data()
QTest::addColumn<QString>("addresses");
QTest::addColumn<int>("err");
+#ifdef Q_OS_SYMBIAN
+ // Test server lookup
+ QTest::newRow("lookup_01") << QtNetworkSettings::serverName() << QtNetworkSettings::serverIP() << int(QHostInfo::NoError);
+ QTest::newRow("literal_ip4") << QtNetworkSettings::serverIP() << QtNetworkSettings::serverIP() << int(QHostInfo::NoError);
+ QTest::newRow("multiple_ip4") << "multi.dev.troll.no" << "1.2.3.4 1.2.3.5 10.3.3.31" << int(QHostInfo::NoError);
+#else
QTest::newRow("empty") << "" << "" << int(QHostInfo::HostNotFound);
QTest::newRow("lupinella_00") << "l" << lupinellaIp << int(QHostInfo::NoError);
- QTest::newRow("lupinella_01") << "lupinella" << lupinellaIp << int(QHostInfo::NoError);
+ QTest::newRow("lupinella_01") << "lupinella" << lupinellaIp << int(QHostInfo::NoError);
QTest::newRow("lupinella_02") << "lupinella.troll.no" << lupinellaIp << int(QHostInfo::NoError);
QTest::newRow("lupinella_03") << "lupinella.trolltech.com" << lupinellaIp << int(QHostInfo::NoError);
QTest::newRow("multiple_ip4") << "multi.dev.troll.no" << "1.2.3.4 1.2.3.5 10.3.3.31" << int(QHostInfo::NoError);
QTest::newRow("literal_ip4") << lupinellaIp << lupinellaIp << int(QHostInfo::NoError);
+#endif
QTest::newRow("notfound") << "this-name-does-not-exist-hopefully." << "" << int(QHostInfo::HostNotFound);
QTest::newRow("idn-ace") << "xn--alqualond-34a.troll.no" << "10.3.3.55" << int(QHostInfo::NoError);
@@ -383,10 +393,10 @@ protected:
void tst_QHostInfo::threadSafety()
{
const int nattempts = 5;
-#if !defined(Q_OS_WINCE)
- const int runs = 100;
-#else
+#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
const int runs = 10;
+#else
+ const int runs = 100;
#endif
LookupThread thr[nattempts];
for (int j = 0; j < runs; ++j) {