diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-01-03 14:38:11 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-03 23:45:06 +0100 |
commit | 91371ffd3d00e10635f58d1e9efe8c1b3f467537 (patch) | |
tree | 50a6b7f885721b6db2c0a8fcbb2a547e216102fb /tests/auto/qbluetoothlocaldevice | |
parent | 3336383132b1aafeb74585d203e98e85811af55e (diff) |
QtConnectivity: Fix test crashes/asserts/hangs.
- Fix crash caused by uninitialized d-ptr in local device
default implementation (Windows).
- Fix crash caused by uninitialized d-ptr in local device
bluez implementation (Linux) if connection fails.
- Verify local device validity before d-ptr is accessed in
test
- Fix crash in QNdefNfcUriRecord::uri() in case
abbreviations[0] (==0) is accessed.
- Terminate wait loops
- Check signal spy before accessing first element.
- Fix compiler warnings.
Change-Id: I92d54b4dfcc05e8befb49f2bd72b60251641aa48
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Alex <alex.blasche@nokia.com>
Diffstat (limited to 'tests/auto/qbluetoothlocaldevice')
-rw-r--r-- | tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp b/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp index 69853bd6..3f13e79f 100644 --- a/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp +++ b/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp @@ -195,6 +195,7 @@ void tst_QBluetoothLocalDevice::tst_hostModes() QTRY_VERIFY(hostModeSpy.count() > 0); } // test the actual signal values. + QVERIFY(hostModeSpy.count() > 0); QList<QVariant> arguments = hostModeSpy.takeFirst(); QBluetoothLocalDevice::HostMode hostMode = qvariant_cast<QBluetoothLocalDevice::HostMode>(arguments.at(0)); QCOMPARE(hostModeExpected, hostMode); @@ -250,6 +251,7 @@ void tst_QBluetoothLocalDevice::tst_pairDevice() QVERIFY(pairingSpy.isValid()); QVERIFY(pairingSpy.isEmpty()); + QVERIFY(localDevice.isValid()); localDevice.requestPairing(deviceAddress, pairingExpected); // async, wait for it QTRY_VERIFY(pairingSpy.count() > 0); |