diff options
author | Alex Blasche <alexander.blasche@theqtcompany.com> | 2016-08-03 13:35:38 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@theqtcompany.com> | 2016-08-03 13:35:38 +0200 |
commit | bb3f0064e60107c17ba5a90dd35d64116a4a8a89 (patch) | |
tree | e1d068fdfd205f9051691542aba04882fd80e110 /tests/auto | |
parent | 907c43f83768bf1b7fea89960ff5b60a714007d6 (diff) | |
parent | 4976498621fb05804201dad52eab2c59d94f0da3 (diff) | |
download | qtconnectivity-bb3f0064e60107c17ba5a90dd35d64116a4a8a89.tar.gz |
Merge remote-tracking branch 'gerrit/btle' into dev
Merges Qt Bluetooth Low Energy port on WinRT into mainline.
Change-Id: Ic519955dfee4a57635c525a79b900340fbc5562f
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp | 6 | ||||
-rw-r--r-- | tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp | 18 |
2 files changed, 12 insertions, 12 deletions
diff --git a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp index d37a67de..f8ab72f7 100644 --- a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp +++ b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp @@ -471,10 +471,10 @@ void tst_QBluetoothDeviceDiscoveryAgent::tst_deviceDiscovery() } } } -#ifdef Q_OS_IOS - //On iOS, we do not have access to the local device/adapter, numberOfAdapters is 0, +#if defined(Q_OS_IOS) || defined(Q_OS_WINRT) + //On iOS/WinRT, 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."); + QSKIP("iOS/WinRT: no local Bluetooth device available. Skipping remaining part of test."); #endif //For multiple Bluetooth adapter do the check only for GeneralUnlimitedInquiry. diff --git a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp index 773c673b..4acfe4d1 100644 --- a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp +++ b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp @@ -120,7 +120,7 @@ tst_QLowEnergyController::~tst_QLowEnergyController() void tst_QLowEnergyController::initTestCase() { -#ifndef Q_OS_MAC +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINRT) if (remoteDevice.isNull() || QBluetoothLocalDevice::allDevices().isEmpty()) { qWarning("No remote device or local adapter found."); @@ -244,7 +244,7 @@ void tst_QLowEnergyController::tst_connect() { QList<QBluetoothHostInfo> localAdapters = QBluetoothLocalDevice::allDevices(); -#if defined(Q_OS_IOS) || defined(Q_OS_TVOS) +#if defined(Q_OS_IOS) || defined(Q_OS_TVOS) || defined(Q_OS_WINRT) if (!remoteDeviceInfo.isValid()) #else if (localAdapters.isEmpty() || !remoteDeviceInfo.isValid()) @@ -260,7 +260,7 @@ void tst_QLowEnergyController::tst_connect() else QCOMPARE(control.remoteName(), remoteDeviceInfo.name()); -#if !defined(Q_OS_IOS) && !defined(Q_OS_TVOS) +#if !defined(Q_OS_IOS) && !defined(Q_OS_TVOS) && !defined(Q_OS_WINRT) const QBluetoothAddress localAdapter = localAdapters.at(0).address(); QCOMPARE(control.localAddress(), localAdapter); QVERIFY(!control.localAddress().isNull()); @@ -403,7 +403,7 @@ void tst_QLowEnergyController::tst_connect() void tst_QLowEnergyController::tst_concurrentDiscovery() { -#ifndef Q_OS_MAC +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINRT) QList<QBluetoothHostInfo> localAdapters = QBluetoothLocalDevice::allDevices(); if (localAdapters.isEmpty()) QSKIP("No local Bluetooth device found. Skipping test."); @@ -440,7 +440,7 @@ void tst_QLowEnergyController::tst_concurrentDiscovery() 30000); } -#ifdef Q_OS_ANDROID +#if defined(Q_OS_ANDROID) || defined(Q_OS_WINRT) QCOMPARE(control.state(), QLowEnergyController::ConnectedState); QCOMPARE(control2.state(), QLowEnergyController::ConnectedState); control2.disconnectFromDevice(); @@ -1642,7 +1642,7 @@ void tst_QLowEnergyController::tst_defaultBehavior() void tst_QLowEnergyController::tst_writeCharacteristic() { -#ifndef Q_OS_MAC +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINRT) QList<QBluetoothHostInfo> localAdapters = QBluetoothLocalDevice::allDevices(); if (localAdapters.isEmpty()) QSKIP("No local Bluetooth device found. Skipping test."); @@ -1816,7 +1816,7 @@ void tst_QLowEnergyController::tst_writeCharacteristic() void tst_QLowEnergyController::tst_readWriteDescriptor() { -#ifndef Q_OS_MAC +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINRT) QList<QBluetoothHostInfo> localAdapters = QBluetoothLocalDevice::allDevices(); if (localAdapters.isEmpty()) QSKIP("No local Bluetooth device found. Skipping test."); @@ -2239,7 +2239,7 @@ void tst_QLowEnergyController::tst_customProgrammableDevice() */ void tst_QLowEnergyController::tst_errorCases() { -#ifndef Q_OS_MAC +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINRT) QList<QBluetoothHostInfo> localAdapters = QBluetoothLocalDevice::allDevices(); if (localAdapters.isEmpty()) QSKIP("No local Bluetooth device found. Skipping test."); @@ -2461,7 +2461,7 @@ void tst_QLowEnergyController::tst_errorCases() */ void tst_QLowEnergyController::tst_writeCharacteristicNoResponse() { -#ifndef Q_OS_MAC +#if !defined(Q_OS_MAC) && !defined(Q_OS_WINRT) QList<QBluetoothHostInfo> localAdapters = QBluetoothLocalDevice::allDevices(); if (localAdapters.isEmpty()) QSKIP("No local Bluetooth device found. Skipping test."); |