summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-12-03 13:08:48 +0100
committerTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-12-03 16:37:26 +0100
commitff28b5529c7620f57130f24ce4fd6d55ab49c0af (patch)
treec6f73dca05edccf597df5c046c01a509426f9994 /tests
parent43536fcb2970bcf3fa67b36777a9cf16ff46363d (diff)
QBluetoothLocalDevice - isValid, tests (OS X and iOS)
Cancel the previous modification - even if BT is off, the device is valid unless we create it with some address (in the 'OFF' state I can not verify any address and the device is considered invalid). Enable (back) auto-test - if BT is off we just skip the test (as it's done in other test functions). Change-Id: I8b013af6a73eab9699a91834e197716836b00e78 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro1
-rw-r--r--tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp8
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro b/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro
index f0d658ff..a95f9a63 100644
--- a/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro
+++ b/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro
@@ -4,5 +4,4 @@ CONFIG += testcase
QT = core concurrent bluetooth testlib
osx:QT += widgets
-osx:CONFIG += insignificant_test
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp b/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp
index 65aff3fb..b2e43068 100644
--- a/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp
+++ b/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp
@@ -241,6 +241,14 @@ void tst_QBluetoothLocalDevice::tst_name()
}
void tst_QBluetoothLocalDevice::tst_isValid()
{
+#ifdef Q_OS_OSX
+ // On OS X we can have a valid device (device.isValid() == true),
+ // that has neither a name nor a valid address - this happens
+ // if a Bluetooth adapter is OFF.
+ if (!QBluetoothLocalDevice::allDevices().count())
+ QSKIP("Skipping test due to missing Bluetooth device");
+#endif
+
QBluetoothLocalDevice localDevice;
QBluetoothAddress invalidAddress("FF:FF:FF:FF:FF:FF");