summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-25 00:56:37 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-25 05:53:00 (GMT)
commit3ccbfc46ef2647421608522aa38c12958e4ea3c3 (patch)
tree874721600ffa38985ee99a98b6ce5043eae122a3 /tests/auto
parentaf5501d2bef7242d3949d639e2bab7e326654bb2 (diff)
downloadQt-3ccbfc46ef2647421608522aa38c12958e4ea3c3.zip
Qt-3ccbfc46ef2647421608522aa38c12958e4ea3c3.tar.gz
Qt-3ccbfc46ef2647421608522aa38c12958e4ea3c3.tar.bz2
Compile with QT_NO_NETWORKINTERFACE defined.
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qnetworksession/test/tst_qnetworksession.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
index c08120c..58b0576 100644
--- a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
+++ b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
@@ -355,11 +355,13 @@ void tst_QNetworkSession::sessionProperties()
// QNetworkSession::interface() should return an invalid interface unless
// session is in the connected state.
qDebug() << "Session state:" << session.state();
+#ifndef QT_NO_NETWORKINTERFACE
qDebug() << "Session iface:" << session.interface().isValid() << session.interface().name();
#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
// On Symbian emulator, the support for data bearers is limited
QCOMPARE(session.state() == QNetworkSession::Connected, session.interface().isValid());
#endif
+#endif
if (!configuration.isValid()) {
QVERIFY(configuration.state() == QNetworkConfiguration::Undefined &&
@@ -694,10 +696,12 @@ void tst_QNetworkSession::userChoiceSession()
QTRY_VERIFY(!stateChangedSpy.isEmpty());
QVERIFY(session.state() == QNetworkSession::Connected);
+#ifndef QT_NO_NETWORKINTERFACE
#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
// On Symbian emulator, the support for data bearers is limited
QVERIFY(session.interface().isValid());
#endif
+#endif
const QString userChoiceIdentifier =
session.sessionProperty("UserChoiceConfiguration").toString();
@@ -839,10 +843,12 @@ void tst_QNetworkSession::sessionOpenCloseStop()
}
QVERIFY(session.state() == QNetworkSession::Connected);
+#ifndef QT_NO_NETWORKINTERFACE
#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
// On Symbian emulator, the support for data bearers is limited
QVERIFY(session.interface().isValid());
#endif
+#endif
} else {
QFAIL("Timeout waiting for session to open.");
}
@@ -875,12 +881,14 @@ void tst_QNetworkSession::sessionOpenCloseStop()
QVERIFY(session2.isOpen());
QVERIFY(session.state() == QNetworkSession::Connected);
QVERIFY(session2.state() == QNetworkSession::Connected);
+#ifndef QT_NO_NETWORKINTERFACE
#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
// On Symbian emulator, the support for data bearers is limited
QVERIFY(session.interface().isValid());
#endif
QCOMPARE(session.interface().hardwareAddress(), session2.interface().hardwareAddress());
QCOMPARE(session.interface().index(), session2.interface().index());
+#endif
}
sessionOpenedSpy2.clear();
@@ -1051,12 +1059,14 @@ void tst_QNetworkSession::sessionOpenCloseStop()
QVERIFY(!session2.isOpen());
QVERIFY(session.state() == QNetworkSession::Connected);
QVERIFY(session2.state() == QNetworkSession::Connected);
+#ifndef QT_NO_NETWORKINTERFACE
#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
// On Symbian emulator, the support for data bearers is limited
QVERIFY(session.interface().isValid());
#endif
QCOMPARE(session.interface().hardwareAddress(), session2.interface().hardwareAddress());
QCOMPARE(session.interface().index(), session2.interface().index());
+#endif
}
sessionClosedSpy2.clear();