diff options
author | alex <alex.blasche@nokia.com> | 2012-02-07 16:59:47 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-08 14:01:13 +0100 |
commit | 09defae552883e1d673021772e51fdce81838560 (patch) | |
tree | 775409288b3b3178d60556be6d9d9d2b9f49616d /tests | |
parent | 79095c3fbc97abd0138b91bb1833628f1d09fdad (diff) | |
download | qtconnectivity-09defae552883e1d673021772e51fdce81838560.tar.gz |
No more Bluetooth on Symbian
This change cleans the code base significantly.
Change-Id: I668d05d72cf5aa896818139e2daba51909c0b9dd
Reviewed-by: Michael Zanetti <michael.zanetti@nokia.com>
Reviewed-by: Alex <alex.blasche@nokia.com>
Diffstat (limited to 'tests')
14 files changed, 0 insertions, 241 deletions
diff --git a/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro b/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro index f32c17cd..f02d22b6 100644 --- a/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro +++ b/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro @@ -4,6 +4,4 @@ CONFIG += testcase QT = core concurrent bluetooth testlib -symbian: TARGET.CAPABILITY = ReadDeviceData LocalServices WriteDeviceData - CONFIG += insignificant_test # QTBUG-22017 diff --git a/tests/auto/qbluetoothdeviceinfo/qbluetoothdeviceinfo.pro b/tests/auto/qbluetoothdeviceinfo/qbluetoothdeviceinfo.pro index e0bf7ab2..28eecce3 100644 --- a/tests/auto/qbluetoothdeviceinfo/qbluetoothdeviceinfo.pro +++ b/tests/auto/qbluetoothdeviceinfo/qbluetoothdeviceinfo.pro @@ -4,6 +4,4 @@ CONFIG += testcase QT = core concurrent bluetooth testlib -symbian: TARGET.CAPABILITY = ReadDeviceData LocalServices WriteDeviceData - CONFIG += insignificant_test # QTBUG-22017 diff --git a/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro b/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro index abb1f3da..d35df900 100644 --- a/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro +++ b/tests/auto/qbluetoothlocaldevice/qbluetoothlocaldevice.pro @@ -4,6 +4,4 @@ CONFIG += testcase QT = core concurrent bluetooth testlib -symbian: TARGET.CAPABILITY = ReadDeviceData LocalServices WriteDeviceData NetworkControl - CONFIG += insignificant_test # QTBUG-22017 diff --git a/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp b/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp index 0e877ef8..1470567c 100644 --- a/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp +++ b/tests/auto/qbluetoothlocaldevice/tst_qbluetoothlocaldevice.cpp @@ -106,16 +106,6 @@ void tst_QBluetoothLocalDevice::tst_pairDevice_data() QTest::newRow("UnPaired Device: DUMMY") << QBluetoothAddress("11:00:00:00:00:00") << QBluetoothLocalDevice::Unpaired; -#ifdef Q_OS_SYMBIAN - - QTest::newRow("unPAIRED Device: J X6") << QBluetoothAddress("d8:75:33:6a:82:85") - << QBluetoothLocalDevice::Unpaired; - QTest::newRow("AuthPAIRED Device: J X6") << QBluetoothAddress("d8:75:33:6a:82:85") - << QBluetoothLocalDevice::AuthorizedPaired; - QTest::newRow("PAIRED Device: J C-7-1") << QBluetoothAddress("6c:9b:02:0c:91:ca") - << QBluetoothLocalDevice::Paired; - -#endif // Q_OS_SYMBIAN } void tst_QBluetoothLocalDevice::tst_pairingStatus_data() @@ -125,12 +115,6 @@ void tst_QBluetoothLocalDevice::tst_pairingStatus_data() QTest::newRow("UnPaired Device: DUMMY") << QBluetoothAddress("11:00:00:00:00:00") << QBluetoothLocalDevice::Unpaired; -#ifdef Q_OS_SYMBIAN - QTest::newRow("PAIRED Device: J X6") << QBluetoothAddress("d8:75:33:6a:82:85") - << QBluetoothLocalDevice::Paired; - QTest::newRow("AuthPAIRED Device: J C-7-1") << QBluetoothAddress("6c:9b:02:0c:91:ca") - << QBluetoothLocalDevice::AuthorizedPaired; -#endif // Q_OS_SYMBIAN } void tst_QBluetoothLocalDevice::tst_powerOn() diff --git a/tests/auto/qbluetoothservicediscoveryagent/qbluetoothservicediscoveryagent.pro b/tests/auto/qbluetoothservicediscoveryagent/qbluetoothservicediscoveryagent.pro index f53e0db7..9b5c771e 100644 --- a/tests/auto/qbluetoothservicediscoveryagent/qbluetoothservicediscoveryagent.pro +++ b/tests/auto/qbluetoothservicediscoveryagent/qbluetoothservicediscoveryagent.pro @@ -4,6 +4,4 @@ CONFIG += testcase QT = core concurrent bluetooth testlib -symbian: TARGET.CAPABILITY = ReadDeviceData LocalServices WriteDeviceData - CONFIG += insignificant_test # QTBUG-22017 diff --git a/tests/auto/qbluetoothserviceinfo/qbluetoothserviceinfo.pro b/tests/auto/qbluetoothserviceinfo/qbluetoothserviceinfo.pro index c93e4962..f5e0a627 100644 --- a/tests/auto/qbluetoothserviceinfo/qbluetoothserviceinfo.pro +++ b/tests/auto/qbluetoothserviceinfo/qbluetoothserviceinfo.pro @@ -4,6 +4,4 @@ CONFIG += testcase QT = core concurrent bluetooth testlib -symbian: TARGET.CAPABILITY = ReadDeviceData LocalServices WriteDeviceData - CONFIG += insignificant_test # QTBUG-22017 diff --git a/tests/auto/qbluetoothsocket/qbluetoothsocket.pro b/tests/auto/qbluetoothsocket/qbluetoothsocket.pro index b98ecf13..e0ea985a 100644 --- a/tests/auto/qbluetoothsocket/qbluetoothsocket.pro +++ b/tests/auto/qbluetoothsocket/qbluetoothsocket.pro @@ -7,8 +7,6 @@ QT = core concurrent network bluetooth testlib INCLUDEPATH += ../../../tests/btclient DEPENDPATH += ../../../tests/btclient -symbian: TARGET.CAPABILITY = NetworkControl ReadDeviceData LocalServices WriteDeviceData - OTHER_FILES += \ README.txt diff --git a/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp b/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp index 3520d6be..512f4d7d 100644 --- a/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp +++ b/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp @@ -60,9 +60,6 @@ Q_DECLARE_METATYPE(QBluetoothSocket::SocketType) //#define BTADDRESS "00:1A:9F:92:9E:5A" char BTADDRESS[] = "00:00:00:00:00:00"; -#ifdef Q_OS_SYMBIAN -static const QString peerNameSymbian("Patagonia_bluetooth_client"); -#endif // Max time to wait for connection @@ -675,7 +672,6 @@ void tst_QBluetoothSocket::tst_localPeer() QFETCH(quint16, peerPort); Q_UNUSED(peerPort) -#ifndef Q_OS_SYMBIAN QStringList args; args << "name" << peerAddress.toString(); QProcess *hcitool = new QProcess(); @@ -684,7 +680,6 @@ void tst_QBluetoothSocket::tst_localPeer() QString peerNameHCI = hcitool->readLine().trimmed(); hcitool->close(); delete hcitool; -#endif /* Construction */ @@ -729,11 +724,7 @@ void tst_QBluetoothSocket::tst_localPeer() QCOMPARE(socket->localName(), list[2]); QCOMPARE(socket->localAddress(), QBluetoothAddress(list[3])); QCOMPARE(socket->localPort(), list[4].toUShort()); -#ifndef Q_OS_SYMBIAN QCOMPARE(socket->peerName(), peerNameHCI); -#else - QCOMPARE(socket->peerName(), peerNameSymbian); -#endif /* Disconnection */ QSignalSpy disconnectedSpy(socket, SIGNAL(disconnected())); diff --git a/tests/auto/qbluetoothtransfermanager/qbluetoothtransfermanager.pro b/tests/auto/qbluetoothtransfermanager/qbluetoothtransfermanager.pro index cba068be..a2003298 100644 --- a/tests/auto/qbluetoothtransfermanager/qbluetoothtransfermanager.pro +++ b/tests/auto/qbluetoothtransfermanager/qbluetoothtransfermanager.pro @@ -7,6 +7,4 @@ QT = core concurrent bluetooth testlib INCLUDEPATH += ../../../tests/btclient DEPENDPATH += ../../../tests/btclient -symbian: TARGET.CAPABILITY = All-TCB #ReadDeviceData LocalServices WriteDeviceData - CONFIG += insignificant_test # QTBUG-22017 diff --git a/tests/auto/qbluetoothtransfermanager/tst_qbluetoothtransfermanager.cpp b/tests/auto/qbluetoothtransfermanager/tst_qbluetoothtransfermanager.cpp index 7b5f8224..8c2e6346 100644 --- a/tests/auto/qbluetoothtransfermanager/tst_qbluetoothtransfermanager.cpp +++ b/tests/auto/qbluetoothtransfermanager/tst_qbluetoothtransfermanager.cpp @@ -61,12 +61,7 @@ QTBLUETOOTH_USE_NAMESPACE typedef QMap<int,QVariant> tst_QBluetoothTransferManager_QParameterMap; Q_DECLARE_METATYPE(tst_QBluetoothTransferManager_QParameterMap) -#ifdef Q_OS_SYMBIAN -char BTADDRESS[] = "00:09:DD:50:93:DD"; -static const QString testfile("c:\\data\\testdata.txt"); -#else char BTADDRESS[] = "00:00:00:00:00:00"; -#endif static const int MaxConnectTime = 60 * 1000; // 1 minute in ms @@ -121,7 +116,6 @@ void tst_QBluetoothTransferManager::initTestCase() device->powerOn(); delete device; -#ifndef Q_OS_SYMBIAN // Go find an echo server for BTADDRESS QBluetoothServiceDiscoveryAgent *sda = new QBluetoothServiceDiscoveryAgent(this); connect(sda, SIGNAL(serviceDiscovered(QBluetoothServiceInfo)), this, SLOT(serviceDiscovered(QBluetoothServiceInfo))); @@ -144,7 +138,6 @@ void tst_QBluetoothTransferManager::initTestCase() QFAIL("Unable to find test service"); } delete sda; -#endif } void tst_QBluetoothTransferManager::error(QBluetoothServiceDiscoveryAgent::Error error) { @@ -198,42 +191,6 @@ void tst_QBluetoothTransferManager::tst_put() } QBluetoothTransferManager manager; - -#ifdef Q_OS_SYMBIAN - { - QFile fileToWrite(testfile); - if (!fileToWrite.open(QIODevice::WriteOnly | QIODevice::Text)) - return; - - QTextStream out(&fileToWrite); - out << "This_is_testdata!!!"; - fileToWrite.close(); - } - - QFile file(testfile); - if (!file.exists()) - return; - - QBluetoothTransferReply *reply = manager.put(transferRequest, &file); - int connectTime = MaxConnectTime; - - QSignalSpy finishedSpy(&manager, SIGNAL(finished(QBluetoothTransferReply*))); - while (finishedSpy.count() == 0 && connectTime > 0) { - QTest::qWait(1000); - connectTime -= 1000; - } - QCOMPARE(finishedSpy.count(), 1); - - int error = reply->error(); - qDebug()<<"QtBluetoothTester::SendData reply->error ="<<error; - QVERIFY(error == QBluetoothTransferReply::NoError); - - if (error != QBluetoothTransferReply::NoError) { - qDebug() << "Failed to send file"; - } - delete reply; - file.close(); -#endif } void tst_QBluetoothTransferManager::tst_putAbort_data() @@ -261,35 +218,6 @@ void tst_QBluetoothTransferManager::tst_putAbort() } QBluetoothTransferManager manager; - -#ifdef Q_OS_SYMBIAN - { - QFile fileToWrite(testfile); - if (!fileToWrite.open(QIODevice::WriteOnly | QIODevice::Text)) - return; - - QTextStream out(&fileToWrite); - out << "This_is_testdata!!!"; - fileToWrite.close(); - } - - QFile file(testfile); - if (!file.exists()) - return; - - QBluetoothTransferReply *reply = manager.put(transferRequest, &file); - reply->abort(); - - int error = reply->error(); - qDebug()<<"QtBluetoothTester::SendData reply->error ="<<error; - QVERIFY(error == QBluetoothTransferReply::NoError); - - if (error != QBluetoothTransferReply::NoError) { - qDebug() << "Failed to send file"; - } - delete reply; - file.close(); -#endif } void tst_QBluetoothTransferManager::tst_attribute_data() @@ -317,32 +245,6 @@ void tst_QBluetoothTransferManager::tst_attribute() } QBluetoothTransferManager manager; - -#ifdef Q_OS_SYMBIAN - { - QFile fileToWrite(testfile); - if (!fileToWrite.open(QIODevice::WriteOnly | QIODevice::Text)) - return; - - QTextStream out(&fileToWrite); - out << "This_is_testdata!!!"; - fileToWrite.close(); - } - - QFile file(testfile); - if (!file.exists()) - return; - - QBluetoothTransferReply *reply = manager.put(transferRequest, &file); - reply->abort(); - - QVERIFY(reply->attribute(QBluetoothTransferRequest::DescriptionAttribute) == QVariant("Desciption")); - QVERIFY(reply->attribute(QBluetoothTransferRequest::LengthAttribute) == QVariant("1024")); - QVERIFY(reply->attribute(QBluetoothTransferRequest::TypeAttribute) == QVariant("OPP")); - - delete reply; - file.close(); -#endif } void tst_QBluetoothTransferManager::tst_operation_data() @@ -358,28 +260,6 @@ void tst_QBluetoothTransferManager::tst_operation() QBluetoothTransferRequest transferRequest(address); QBluetoothTransferManager manager; -#ifdef Q_OS_SYMBIAN - { - QFile fileToWrite(testfile); - if (!fileToWrite.open(QIODevice::WriteOnly | QIODevice::Text)) - return; - - QTextStream out(&fileToWrite); - out << "This_is_testdata!!!"; - fileToWrite.close(); - } - - QFile file(testfile); - if (!file.exists()) - return; - - QBluetoothTransferReply *reply = manager.put(transferRequest, &file); - - QVERIFY(reply->operation() == QBluetoothTransferManager::PutOperation); - - delete reply; - file.close(); -#endif } void tst_QBluetoothTransferManager::tst_manager_data() @@ -395,28 +275,6 @@ void tst_QBluetoothTransferManager::tst_manager() QBluetoothTransferRequest transferRequest(address); QBluetoothTransferManager manager; -#ifdef Q_OS_SYMBIAN - { - QFile fileToWrite(testfile); - if (!fileToWrite.open(QIODevice::WriteOnly | QIODevice::Text)) - return; - - QTextStream out(&fileToWrite); - out << "This_is_testdata!!!"; - fileToWrite.close(); - } - - QFile file(testfile); - if (!file.exists()) - return; - - QBluetoothTransferReply *reply = manager.put(transferRequest, &file); - - QVERIFY(reply->manager() == &manager); - - delete reply; - file.close(); -#endif } QTEST_MAIN(tst_QBluetoothTransferManager) diff --git a/tests/auto/qbluetoothtransferrequest/qbluetoothtransferrequest.pro b/tests/auto/qbluetoothtransferrequest/qbluetoothtransferrequest.pro index 15296835..0d92458c 100644 --- a/tests/auto/qbluetoothtransferrequest/qbluetoothtransferrequest.pro +++ b/tests/auto/qbluetoothtransferrequest/qbluetoothtransferrequest.pro @@ -4,6 +4,4 @@ CONFIG += testcase QT = core concurrent bluetooth testlib -symbian: TARGET.CAPABILITY = ReadDeviceData LocalServices WriteDeviceData - CONFIG += insignificant_test # QTBUG-22017 diff --git a/tests/auto/qbluetoothuuid/qbluetoothuuid.pro b/tests/auto/qbluetoothuuid/qbluetoothuuid.pro index 7ba965d2..2d81c4af 100644 --- a/tests/auto/qbluetoothuuid/qbluetoothuuid.pro +++ b/tests/auto/qbluetoothuuid/qbluetoothuuid.pro @@ -3,7 +3,3 @@ TARGET = tst_qbluetoothuuid CONFIG += testcase QT = core concurrent bluetooth testlib - -symbian: { - LIBS *= -lbluetooth -} diff --git a/tests/auto/qbluetoothuuid/tst_qbluetoothuuid.cpp b/tests/auto/qbluetoothuuid/tst_qbluetoothuuid.cpp index 28219240..75924464 100644 --- a/tests/auto/qbluetoothuuid/tst_qbluetoothuuid.cpp +++ b/tests/auto/qbluetoothuuid/tst_qbluetoothuuid.cpp @@ -49,9 +49,6 @@ #if defined(Q_OS_UNIX) # include <arpa/inet.h> # include <netinet/in.h> -#elif defined(Q_OS_SYMBIAN) -//needed for symbian uuid conversion test -#include <bttypes.h> #endif QTBLUETOOTH_USE_NAMESPACE @@ -75,10 +72,6 @@ private slots: void tst_conversion(); void tst_comparison_data(); void tst_comparison(); -#ifdef Q_OS_SYMBIAN - void tst_symbian_uuid_tranformation_data(); - void tst_symbian_uuid_tranformation(); -#endif }; tst_QBluetoothUuid::tst_QBluetoothUuid() @@ -390,51 +383,6 @@ void tst_QBluetoothUuid::tst_comparison() } } } -#ifdef Q_OS_SYMBIAN -void tst_QBluetoothUuid::tst_symbian_uuid_tranformation_data() -{ - tst_conversion_data(); -} - -void tst_QBluetoothUuid::tst_symbian_uuid_tranformation() -{ - QFETCH(quint128, uuid128); - - QBluetoothUuid quuid128(uuid128); - - for (int var = 0; var < 16; ++var) { - QVERIFY(quuid128.toUInt128().data[var] == uuid128.data[var]); - } - - if (quuid128.minimumSize() == 2) { - TUUID sUuid(quuid128.toUInt16()); - QBluetoothUuid fromSymbianUuid(ntohs(*reinterpret_cast<const quint16 *>(sUuid.Des().Ptr()))); - QCOMPARE(quuid128, fromSymbianUuid); - //qDebug()<<"sUuid size ="<<sUuid.Des().Length() ; - } else if (quuid128.minimumSize() == 4) { - TUUID sUuid(quuid128.toUInt32()); - QBluetoothUuid fromSymbianUuid(ntohl(*reinterpret_cast<const quint32 *>(sUuid.Des().Ptr()))); - QCOMPARE(quuid128, fromSymbianUuid); - //qDebug()<<"sUuid size ="<<sUuid.Des().Length() ; - } else if (quuid128.minimumSize()==16) { - - TUint32 *dataPointer = (TUint32*)quuid128.toUInt128().data; - TUint32 hH = qToBigEndian<quint32>(*(dataPointer++)); - TUint32 hL = qToBigEndian<quint32>(*(dataPointer++)); - TUint32 lH = qToBigEndian<quint32>(*(dataPointer++)); - TUint32 lL = qToBigEndian<quint32>(*(dataPointer)); - TUUID sUuid(hH, hL, lH, lL); - //qDebug()<<"sUuid size ="<<sUuid.Des().Length() ; - //qDebug()<<"sUuid longsize ="<<sUuid.LongForm().Length() ; - - for (int var = 0; var < sUuid.Des().Length(); ++var) { - //qDebug()<<"sUuid at ="<<var<<"="<<sUuid.Des()[var] ; - //qDebug()<<"quuid128 at ="<<var<<"="<<quuid128.toUInt128().data[var] ; - QVERIFY(quuid128.toUInt128().data[var] == sUuid.Des()[var]); - } - } -} -#endif //Q_OS_SYMBIAN QTEST_MAIN(tst_QBluetoothUuid) #include "tst_qbluetoothuuid.moc" diff --git a/tests/auto/ql2capserver/ql2capserver.pro b/tests/auto/ql2capserver/ql2capserver.pro index 9853e045..453c07fa 100644 --- a/tests/auto/ql2capserver/ql2capserver.pro +++ b/tests/auto/ql2capserver/ql2capserver.pro @@ -5,5 +5,3 @@ TARGET = tst_ql2capserver #CONFIG += testcase QT = core concurrent bluetooth testlib - -symbian: TARGET.CAPABILITY = LocalServices NetworkControl |