summaryrefslogtreecommitdiffstats
path: root/tests/auto/qbluetoothdevicediscoveryagent
diff options
context:
space:
mode:
authorTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-10-29 10:15:54 +0100
committerTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-11-10 10:01:52 +0100
commite0dc61db4af89cce14ade3582ac92e4b713c7982 (patch)
treedbdeffaf2648da1532144367953ce0d72ff86d50 /tests/auto/qbluetoothdevicediscoveryagent
parentf1372ef9a1c4ad5bb7c7bbd94116ec1203fc4243 (diff)
Bluetooth - device (LE) discovery for iOS
Add a QBluetoothDeviceDiscoveryAgent for iOS, implementation is based on Core Bluetooth framework. Low Energy devices scan only. - Ctor with address: set error as invalid bluetooth adapter error, Core Bluetooth framework does not provide access to the local adapter's address. - Adjust a test - we do not have access to the 'local device' information on iOS (no address, no number of devices etc.) - skip the last test in tst_deviceDiscovery. Change-Id: I49080d021c340016aebc548cc8ed758777c66397 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'tests/auto/qbluetoothdevicediscoveryagent')
-rw-r--r--tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp
index bf273c79..e80a6dc5 100644
--- a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp
+++ b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp
@@ -427,7 +427,13 @@ void tst_QBluetoothDeviceDiscoveryAgent::tst_deviceDiscovery()
}
}
}
- //For multiple Bluetooth adapter do the check only for GeneralUnlimitedInquiry
+#ifdef Q_OS_IOS
+ //On iOS, we do not have access to the local device/adapter, numberOfAdapters is 0,
+ //so we skip this test at all.
+ QSKIP("iOS: no local Bluetooth device available. Skipping remaining part of test.");
+#endif
+
+ //For multiple Bluetooth adapter do the check only for GeneralUnlimitedInquiry.
if (!(inquiryType == QBluetoothDeviceDiscoveryAgent::LimitedInquiry))
QVERIFY((numberOfAdapters-1) == counter);
}