summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-09-30 17:46:40 +0200
committerTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-10-02 07:30:09 +0200
commit552bdb884b44fffde3075ee2016a8a5c04108b3c (patch)
treeef7d4c45aaff1cae8a4fba0c97e89c31b8fb5245 /tests
parentfc3d2fbbe53731dc336133b00fb0128506937c16 (diff)
QBluetoothServer - enable auto test on OS X.
Enable test and skip the part, that tries to set host mode and check the success (setHostMode is a noop on OS X). Change-Id: Ib2583b9d0990c38445aaa44d62e778f5ac820141 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qbluetoothserver/qbluetoothserver.pro4
-rw-r--r--tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp8
2 files changed, 7 insertions, 5 deletions
diff --git a/tests/auto/qbluetoothserver/qbluetoothserver.pro b/tests/auto/qbluetoothserver/qbluetoothserver.pro
index ccc8aa60..ad0d1fab 100644
--- a/tests/auto/qbluetoothserver/qbluetoothserver.pro
+++ b/tests/auto/qbluetoothserver/qbluetoothserver.pro
@@ -3,11 +3,9 @@ TARGET = tst_qbluetoothserver
CONFIG += testcase
QT = core concurrent bluetooth testlib
+osx:QT += widgets
OTHER_FILES += \
README.txt
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-
-osx:CONFIG += insignificant_test
-
diff --git a/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp b/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
index 740ea05e..084d923c 100644
--- a/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
+++ b/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
@@ -182,12 +182,16 @@ void tst_QBluetoothServer::tst_receive()
bool localDeviceAvailable = localDev.isValid();
if (localDeviceAvailable) {
+ // setHostMode is noop on OS X.
setHostMode(address, hostmode);
- if (hostmode == QBluetoothLocalDevice::HostPoweredOff)
+ if (hostmode == QBluetoothLocalDevice::HostPoweredOff) {
+#ifndef Q_OS_OSX
QCOMPARE(localDevice.hostMode(), hostmode);
- else
+#endif
+ } else {
QVERIFY(localDevice.hostMode() != QBluetoothLocalDevice::HostPoweredOff);
+ }
}
QBluetoothServer server(QBluetoothServiceInfo::RfcommProtocol);
QSignalSpy errorSpy(&server, SIGNAL(error(QBluetoothServer::Error)));