void tst_QIODevice::initTestCase()
{
- QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
}
// Testing get/set functions
#if defined(Q_OS_WINCE) && defined(WINCE_EMULATOR_TEST)
QSKIP("Networking tests in a WinCE emulator are unstable");
#endif
+ if (!QtNetworkSettings::verifyTestNetworkSettings())
+ QSKIP("No network test server available");
+
QTcpSocket socket;
QIODevice *device = &socket;
result = QByteArray("ZXCV");
lineResult = "ZXCV";
} else {
+ if (!QtNetworkSettings::verifyTestNetworkSettings())
+ QSKIP("No network test server available");
socket.connectToHost(QtNetworkSettings::serverName(), 80);
socket.write("GET / HTTP/1.0\r\n\r\n");
QVERIFY(socket.waitForReadyRead());
void tst_QTextStream::initTestCase()
{
- QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
-
testFileName = tempDir.path() + "/testfile";
// chdir into the testdata dir and refer to our helper apps with relative paths
#ifdef Q_OS_WINCE
QSKIP("Qt/CE: Cannot test network on emulator");
#endif
+ if (!QtNetworkSettings::verifyTestNetworkSettings())
+ QSKIP("No network test server available");
+
QTcpSocket socket;
socket.connectToHost(QtNetworkSettings::serverName(), 143);
QVERIFY(socket.waitForReadyRead(5000));