diff options
author | Andreas Buhr <andreas.buhr@qt.io> | 2022-02-28 18:32:14 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-03-02 11:17:06 +0000 |
commit | 19ab9a4b8839f0fa201295a065a89e721687f28e (patch) | |
tree | a2d005b8a3b176c956bf7ea4015e715d27a7c264 | |
parent | 9b165d89c14acb5d67383a956a779fba7708b716 (diff) | |
download | qtconnectivity-19ab9a4b8839f0fa201295a065a89e721687f28e.tar.gz |
Repair tst_QBluetoothDeviceDiscoveryAgent on Android
tst_QBluetoothDeviceDiscoveryAgent::tst_discoveryMethods was broken
on Android because devices with unknown core configuration are found,
while the test tested that every device found has either
LowEnergyCoreConfiguration or BaseRateCoreConfiguration.
Change-Id: I4dc9f50dba989f7827842169dbd06c847a019505
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit ab7b1ec29f6cc1c8490fa71116a82e18789c4ee3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp index cbce5042..f403f4ea 100644 --- a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp +++ b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp @@ -597,7 +597,9 @@ void tst_QBluetoothDeviceDiscoveryAgent::tst_discoveryMethods() const QBluetoothDeviceInfo info = qvariant_cast<QBluetoothDeviceInfo>(discoveredSpy.takeFirst().at(0)); QVERIFY(info.isValid()); - QVERIFY(info.coreConfigurations() & expectedConfiguration); + // on Android we do find devices with unknown configuration + if (info.coreConfigurations() != QBluetoothDeviceInfo::UnknownCoreConfiguration) + QVERIFY(info.coreConfigurations() & expectedConfiguration); } } |