diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2017-08-07 08:16:45 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2017-08-07 08:17:26 +0200 |
commit | c3c3837b02919a26031d917003898e72585e300b (patch) | |
tree | 02d2166f1e896327efd8a97df3455fd8359fa2be /tests/auto | |
parent | aeeae7bc92f19778a73fb10a09b8949b2c384d39 (diff) | |
parent | 687ec9eb370e9538264280b58bed4d3b1c889579 (diff) |
Merge remote-tracking branch 'gerrit/5.9' into dev
Change-Id: I0ed4afd881f483a166a7e1400043f116c491f30c
Diffstat (limited to 'tests/auto')
3 files changed, 21 insertions, 2 deletions
diff --git a/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp b/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp index b4d472d0..fcba4c3a 100644 --- a/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp +++ b/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp @@ -270,10 +270,16 @@ void tst_QBluetoothLocalDevice::tst_isValid() QVERIFY(!invalidLocalDevice.isValid()); QCOMPARE(invalidLocalDevice.address(), QBluetoothAddress()); QCOMPARE(invalidLocalDevice.name(), QString()); +#ifndef Q_OS_WINRT QCOMPARE(invalidLocalDevice.pairingStatus(QBluetoothAddress()), QBluetoothLocalDevice::Unpaired ); QCOMPARE(invalidLocalDevice.hostMode(), QBluetoothLocalDevice::HostPoweredOff); - +#else + // When QTBUG-62294 is fixed, the pairingStatus part is consistent across platforms + QCOMPARE(invalidLocalDevice.pairingStatus(QBluetoothAddress()), QBluetoothLocalDevice::Paired); + QCOMPARE(invalidLocalDevice.hostMode(), QBluetoothLocalDevice::HostConnectable); +#endif } + void tst_QBluetoothLocalDevice::tst_allDevices() { //nothing we can really test here @@ -387,9 +393,16 @@ void tst_QBluetoothLocalDevice::tst_pairingStatus_data() QTest::addColumn<QBluetoothAddress>("deviceAddress"); QTest::addColumn<QBluetoothLocalDevice::Pairing>("pairingExpected"); +#ifndef Q_OS_WINRT QTest::newRow("UnPaired Device: DUMMY") << QBluetoothAddress("11:00:00:00:00:00") << QBluetoothLocalDevice::Unpaired; QTest::newRow("Invalid device") << QBluetoothAddress() << QBluetoothLocalDevice::Unpaired; +#else + // Remove special case when QTBUG-62294 is fixed + QTest::newRow("UnPaired Device: DUMMY") << QBluetoothAddress("11:00:00:00:00:00") + << QBluetoothLocalDevice::Paired; + QTest::newRow("Invalid device") << QBluetoothAddress() << QBluetoothLocalDevice::Paired; +#endif //valid devices are already tested by tst_pairDevice() } diff --git a/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp b/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp index b6fd9211..2cb86fb4 100644 --- a/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp +++ b/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp @@ -217,7 +217,9 @@ void tst_QBluetoothServer::tst_receive() QVERIFY(result); +#ifndef Q_OS_WINRT QVERIFY(QBluetoothLocalDevice::allDevices().count()); +#endif QCOMPARE(server.error(), QBluetoothServer::NoError); QCOMPARE(server.serverAddress(), address); QCOMPARE(server.serverPort(), quint16(20)); diff --git a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp index f5e1ec4b..c6fd83e6 100644 --- a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp +++ b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp @@ -117,9 +117,13 @@ tst_QLowEnergyController::~tst_QLowEnergyController() void tst_QLowEnergyController::initTestCase() { -#if !defined(Q_OS_MAC) && !defined(Q_OS_WINRT) +#if !defined(Q_OS_MAC) if (remoteDevice.isNull() +#ifndef Q_OS_WINRT || QBluetoothLocalDevice::allDevices().isEmpty()) { +#else + ) { +#endif qWarning("No remote device or local adapter found."); return; } |