Q_OBJECT
private slots:
+ void initTestCase();
void getSetCheck();
void constructing_QTcpSocket();
void constructing_QFile();
void peekBug();
};
+void tst_QIODevice::initTestCase()
+{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+}
+
// Testing get/set functions
void tst_QIODevice::getSetCheck()
{
Q_OBJECT
public slots:
+ void initTestCase();
void cleanup();
private slots:
void generateRealNumbersDataWrite();
};
+void tst_QTextStream::initTestCase()
+{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+}
+
// Testing get/set functions
void tst_QTextStream::getSetCheck()
{
void tst_NetworkSelfTest::initTestCase()
{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
#ifndef QT_NO_BEARERMANAGEMENT
netConfMan = new QNetworkConfigurationManager(this);
networkConfiguration = netConfMan->defaultConfiguration();
public:
tst_QNetworkAccessManager_And_QProgressDialog();
private slots:
+ void initTestCase();
void downloadCheck();
void downloadCheck_data();
};
{
}
+void tst_QNetworkAccessManager_And_QProgressDialog::initTestCase()
+{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+}
+
void tst_QNetworkAccessManager_And_QProgressDialog::downloadCheck_data()
{
QTest::addColumn<bool>("useZeroCopy");
return false;
}
-};
#ifdef QT_NETWORK_LIB
-class QtNetworkSettingsInitializerCode {
-public:
- QtNetworkSettingsInitializerCode() {
+ static bool verifyTestNetworkSettings()
+ {
QHostInfo testServerResult = QHostInfo::fromName(QtNetworkSettings::serverName());
if (testServerResult.error() != QHostInfo::NoError) {
qWarning() << "Could not lookup" << QtNetworkSettings::serverName();
qWarning() << "Please configure the test environment!";
qWarning() << "See /etc/hosts or network-settings.h";
- qFatal("Exiting");
+ return false;
}
+ return true;
}
-};
-QtNetworkSettingsInitializerCode qtNetworkSettingsInitializer;
#endif
+};
void tst_QAbstractNetworkCache::initTestCase()
{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
#ifndef QT_NO_BEARERMANAGEMENT
netConfMan = new QNetworkConfigurationManager(this);
networkConfiguration = netConfMan->defaultConfiguration();
void tst_QFtp::initTestCase()
{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
#ifndef QT_NO_BEARERMANAGEMENT
QNetworkConfigurationManager manager;
networkSessionImplicit = QSharedPointer<QNetworkSession>(new QNetworkSession(manager.defaultConfiguration()));
void tst_QHttp::initTestCase()
{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
}
void tst_QHttp::cleanupTestCase()
void tst_QHttpNetworkConnection::initTestCase()
{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
}
void tst_QHttpNetworkConnection::cleanupTestCase()
void tst_QNetworkReply::initTestCase()
{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
#if !defined Q_OS_WIN
wronlyFileName = QDir::currentPath() + "/write-only";
QFile wr(wronlyFileName);
void tst_QHostInfo::initTestCase()
{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
#ifndef QT_NO_BEARERMANAGEMENT
//start the default network
netConfMan = new QNetworkConfigurationManager(this);
void tst_QNetworkInterface::initTestCase()
{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
#ifndef QT_NO_BEARERMANAGEMENT
netConfMan = new QNetworkConfigurationManager(this);
networkConfiguration = netConfMan->defaultConfiguration();
public slots:
+ void initTestCase();
void init();
void cleanup();
private slots:
{
}
+void tst_PlatformSocketEngine::initTestCase()
+{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+}
+
void tst_PlatformSocketEngine::init()
{
}
public slots:
+ void initTestCase();
void init();
void cleanup();
private slots:
{
}
+void tst_QHttpSocketEngine::initTestCase()
+{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+}
void tst_QHttpSocketEngine::init()
{
public slots:
+ void initTestCase();
void init();
void cleanup();
private slots:
{
}
+void tst_QSocks5SocketEngine::initTestCase()
+{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+}
+
void tst_QSocks5SocketEngine::init()
{
tmpSocket = 0;
void tst_QTcpServer::initTestCase()
{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
#ifndef QT_NO_BEARERMANAGEMENT
QNetworkConfigurationManager man;
networkSession = new QNetworkSession(man.defaultConfiguration(), this);
public slots:
void initTestCase_data();
+ void initTestCase();
void init();
void cleanup();
private slots:
#endif
}
+void tst_QTcpSocket::initTestCase()
+{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+}
+
void tst_QTcpSocket::init()
{
QFETCH_GLOBAL(bool, setProxy);
public slots:
void initTestCase_data();
+ void initTestCase();
void init();
void cleanup();
private slots:
#endif
}
+void tst_QUdpSocket::initTestCase()
+{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+}
+
void tst_QUdpSocket::init()
{
QFETCH_GLOBAL(bool, setProxy);
public slots:
void initTestCase_data();
+ void initTestCase();
void init();
void cleanup();
void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth);
// QTest::newRow("WithHttpProxyNtlmAuth") << true << int(HttpProxy | AuthNtlm);
}
+void tst_QSslSocket::initTestCase()
+{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+}
+
void tst_QSslSocket::init()
{
QFETCH_GLOBAL(bool, setProxy);
public slots:
void initTestCase_data();
+ void initTestCase();
void init();
void cleanup();
void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth);
// QTest::newRow("WithHttpProxyNtlmAuth") << true << int(HttpProxy | AuthNtlm);
}
+void tst_QSslSocket_onDemandCertificates_member::initTestCase()
+{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+}
+
void tst_QSslSocket_onDemandCertificates_member::init()
{
QFETCH_GLOBAL(bool, setProxy);
public slots:
void initTestCase_data();
+ void initTestCase();
void init();
void cleanup();
void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth);
// QTest::newRow("WithHttpProxyNtlmAuth") << true << int(HttpProxy | AuthNtlm);
}
+void tst_QSslSocket_onDemandCertificates_static::initTestCase()
+{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+}
+
void tst_QSslSocket_onDemandCertificates_static::init()
{
QFETCH_GLOBAL(bool, setProxy);
QNetworkAccessManager manager;
private slots:
+ void initTestCase();
void httpLatency();
#ifndef QT_NO_OPENSSL
void httpsRequestChain();
};
+void tst_qnetworkreply::initTestCase()
+{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+}
+
void tst_qnetworkreply::httpLatency()
{
QNetworkAccessManager manager;
public slots:
void initTestCase_data();
+ void initTestCase();
void init();
void cleanup();
private slots:
QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
}
+void tst_QTcpServer::initTestCase()
+{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+}
+
void tst_QTcpServer::init()
{
QFETCH_GLOBAL(bool, setProxy);
public slots:
- void initTestCase_data();
+ void initTestCase();
void init();
void cleanup();
private slots:
{
}
-void tst_QSslSocket::initTestCase_data()
+void tst_QSslSocket::initTestCase()
{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
}
void tst_QSslSocket::init()
public slots:
void initTestCase_data();
+ void initTestCase();
void init();
void slotReadAll() { byteCounter += static_cast<QIODevice *>(sender())->readAll().size(); }
QTest::newRow("remote") << false << QtNetworkSettings::serverName() << 80;
}
+void tst_NetworkStressTest::initTestCase()
+{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+}
+
void tst_NetworkStressTest::init()
{
// clear the internal cache
class tst_qnetworkreply : public QObject
{
Q_OBJECT
- private slots:
+private slots:
+ void initTestCase();
void limiting_data();
void limiting();
-
};
QNetworkReply *reply;
QTime stopwatch;
};
+void tst_qnetworkreply::initTestCase()
+{
+ QVERIFY(QtNetworkSettings::verifyTestNetworkSettings());
+}
+
void tst_qnetworkreply::limiting_data()
{
QTest::addColumn<QUrl>("url");