diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-07-28 23:35:03 (GMT) |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-07-28 23:35:03 (GMT) |
commit | 4c948161f80ddefb568c50f2a2a17612f25f646e (patch) | |
tree | c57306796489819d55b40ed8d04a3ea8794133e3 /tests/auto/q3socket | |
parent | a57403b176c8fe5adcd4a444184832426807d0e9 (diff) | |
download | Qt-4c948161f80ddefb568c50f2a2a17612f25f646e.zip Qt-4c948161f80ddefb568c50f2a2a17612f25f646e.tar.gz Qt-4c948161f80ddefb568c50f2a2a17612f25f646e.tar.bz2 |
Fixed failure of tst_q3socket.
Make the test use network-settings.h correctly.
Diffstat (limited to 'tests/auto/q3socket')
-rw-r--r-- | tests/auto/q3socket/tst_qsocket.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/auto/q3socket/tst_qsocket.cpp b/tests/auto/q3socket/tst_qsocket.cpp index b07fa2f..854cc75 100644 --- a/tests/auto/q3socket/tst_qsocket.cpp +++ b/tests/auto/q3socket/tst_qsocket.cpp @@ -124,8 +124,10 @@ void tst_Q3Socket::peerAddress_data() QTest::addColumn<bool>("peerClosesConnection"); QTest::addColumn<QString>("peerAddr"); - QTest::newRow( "echo" ) << QString("qt-test-server.troll.no") << (uint)7 << false << QString("10.3.3.69"); - QTest::newRow( "daytime" ) << QString("qt-test-server.troll.no") << (uint)13 << true << QString("10.3.3.69"); + QTest::newRow( "echo" ) << QtNetworkSettings::serverLocalName() << (uint)7 << false + << QtNetworkSettings::serverIP().toString(); + QTest::newRow( "daytime" ) << QtNetworkSettings::serverLocalName() << (uint)13 << true + << QtNetworkSettings::serverIP().toString(); } void tst_Q3Socket::peerAddress() @@ -191,7 +193,7 @@ void tst_Q3Socket::emitConnectionRefused() { Q3Socket sock; connect( &sock, SIGNAL(error(int)), SLOT(emitConnectionRefused_error(int)) ); - sock.connectToHost( "ares.troll.no", 12331 ); + sock.connectToHost( QtNetworkSettings::serverLocalName(), 12331 ); emitConnectionRefused_errorReceived = false; QTestEventLoop::instance().enterLoop( 30 ); @@ -225,8 +227,8 @@ void tst_Q3Socket::connectionAttempts_data() QTest::addColumn<int>("port"); QTest::addColumn<bool>("expectedResult"); - QTest::newRow("fluke port 80") << QString("qt-test-server.troll.no") << 80 << true; - QTest::newRow("fluke port 79") << QString("qt-test-server.troll.no") << 79 << false; + QTest::newRow("fluke port 80") << QtNetworkSettings::serverLocalName() << 80 << true; + QTest::newRow("fluke port 79") << QtNetworkSettings::serverLocalName() << 79 << false; } void tst_Q3Socket::connectionAttempts() @@ -266,7 +268,7 @@ void tst_Q3Socket::canReadLine() connect(&socket, SIGNAL(connected()), &loop, SLOT(quit())); // timeout error will fail in #238 connect(&socket, SIGNAL(error(int)), &loop, SLOT(quit())); - socket.connectToHost("qt-test-server.troll.no", 143); + socket.connectToHost(QtNetworkSettings::serverLocalName(), 143); loop.exec(); |