diff options
author | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2014-09-30 17:29:15 +0200 |
---|---|---|
committer | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2014-10-16 09:46:15 +0200 |
commit | e417b7036e35744daa1978cd236798e3ee1693c0 (patch) | |
tree | 3e86b6ce833e70efa75f8151302973a030338fb2 /tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp | |
parent | 552bdb884b44fffde3075ee2016a8a5c04108b3c (diff) |
QtBluetooth - device discovery test on OS X.
- Enable this auto test on OS X, requires a modification: 'stop' is synchronous
and so cancelSpy.isEmpty() == false (the last QVERIFY fails.
- Fix several problems with SDK versions (workarounds for non-existing methods in SDK < 10.9).
- Change error handling: we set an error in a ctor _only_ if QBluetoothAddress parameter was
not null (!isNull()) and we failed to find a local device with such an address. This is the
only case documented/expected, all others _do_ _not_ set an error, even if a local adapter
is off or does not exits. This fixes a failing (to integrate) auto-test.
Change-Id: I9902211078330f296775f1c3249da166c19001a4
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp')
-rw-r--r-- | tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp index ca22c8ea..dec85fba 100644 --- a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp +++ b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp @@ -314,7 +314,10 @@ void tst_QBluetoothDeviceDiscoveryAgent::tst_startStopDeviceDiscoveries() QVERIFY(errorSpy.isEmpty()); // should only have 1 cancel QVERIFY(finishedSpy.count() == 1); - QVERIFY(cancelSpy.isEmpty()); + + // On OS X, stop is synchronous (signal will be emitted immediately). + if (!immediateSignal) + QVERIFY(cancelSpy.isEmpty()); } void tst_QBluetoothDeviceDiscoveryAgent::finished() |