diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-10-28 14:38:08 +0100 |
---|---|---|
committer | Alex Blasche <alexander.blasche@digia.com> | 2014-10-28 15:13:30 +0100 |
commit | a3d24e23f20b88d941c014bb92e6511a2a3f0d01 (patch) | |
tree | 73ed98dde4dd9016c355e898b8461bb026ff217e /tests | |
parent | 04cb0d4af57cecdb6e47a6e2235083035580fa0d (diff) |
Remove test assumption that each SDP discovery must find a service
Change-Id: Ica8cbd55c70f5d68e8de5d6cef0c094502284b18
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp index 68887e38..83eb24a3 100644 --- a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp +++ b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp @@ -414,6 +414,7 @@ void tst_QBluetoothServiceDiscoveryAgent::tst_serviceDiscovery() } // All returned QBluetoothServiceInfo should be valid. + bool servicesFound = !discoveredSpy.isEmpty(); while (!discoveredSpy.isEmpty()) { const QVariant v = discoveredSpy.takeFirst().at(0); // Work around limitation in QMetaType and moc. @@ -442,7 +443,8 @@ void tst_QBluetoothServiceDiscoveryAgent::tst_serviceDiscovery() } - QVERIFY(discoveryAgent.discoveredServices().count() != 0); + if (servicesFound) + QVERIFY(discoveryAgent.discoveredServices().count() != 0); discoveryAgent.clear(); QVERIFY(discoveryAgent.discoveredServices().count() == 0); |