summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-17 00:48:11 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-18 03:56:52 (GMT)
commit729bbd99736dd88847018a3378fc89e3be348d87 (patch)
treeb50ea1667fd634a5c6d4d597fd30a4ead362442b /tests
parentcda81eebdd74de711953a69bdb4e9088380b2d95 (diff)
downloadQt-729bbd99736dd88847018a3378fc89e3be348d87.zip
Qt-729bbd99736dd88847018a3378fc89e3be348d87.tar.gz
Qt-729bbd99736dd88847018a3378fc89e3be348d87.tar.bz2
Don't fail unit test when there is no default network configuration.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp b/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp
index 3052330..b11868a 100644
--- a/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp
+++ b/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -285,14 +285,12 @@ void tst_QNetworkConfigurationManager::defaultConfiguration()
QNetworkConfiguration defaultConfig = manager.defaultConfiguration();
bool confirm = configs.contains(defaultConfig);
- bool isUserChoice = (defaultConfig.type() == QNetworkConfiguration::UserChoice);
- //user choice config is not part of allConfigurations()
- QVERIFY(isUserChoice != confirm);
- if (!isUserChoice) {
+ if (defaultConfig.type() != QNetworkConfiguration::UserChoice) {
QVERIFY(confirm || !defaultConfig.isValid());
QVERIFY(!(confirm && !defaultConfig.isValid()));
} else {
+ QVERIFY(!confirm); // user choice config is not part of allConfigurations()
QVERIFY(defaultConfig.isValid());
QCOMPARE(defaultConfig.name(), QString("UserChoice"));
QCOMPARE(defaultConfig.children().count(), 0);