summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-02-07 15:35:29 +0100
committerAlex Blasche <alexander.blasche@digia.com>2014-02-07 15:37:03 +0100
commit0a9b6759caf2f7c3d5101d541ff01ccaf14050ae (patch)
tree786fda2f7d421ab6548014e65c20f66697965c91 /tests
parent05294a8c3fbfffa858c696d7113d4144b584d412 (diff)
parent85e9ce386d2d931617f3c0d76acd4ca4165cb81d (diff)
Merge branch 'stable' into dev
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp b/tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp
index 62550622..2195bc0e 100644
--- a/tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp
+++ b/tests/auto/qbluetoothserviceinfo/tst_qbluetoothserviceinfo.cpp
@@ -71,6 +71,8 @@ private slots:
void tst_assignment_data();
void tst_assignment();
+
+ void tst_serviceClassUuids();
};
tst_QBluetoothServiceInfo::tst_QBluetoothServiceInfo()
@@ -329,6 +331,27 @@ void tst_QBluetoothServiceInfo::tst_assignment()
}
}
+void tst_QBluetoothServiceInfo::tst_serviceClassUuids()
+{
+ QBluetoothServiceInfo info;
+ QCOMPARE(info.serviceClassUuids().count(), 0);
+
+ QBluetoothServiceInfo::Sequence classIds;
+ classIds << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::SerialPort));
+ QCOMPARE(classIds.count(), 1);
+
+ QBluetoothUuid uuid(QString("e8e10f95-1a70-4b27-9ccf-02010264e9c8"));
+ classIds.prepend(QVariant::fromValue(uuid));
+ QCOMPARE(classIds.count(), 2);
+ QCOMPARE(classIds.at(0).value<QBluetoothUuid>(), uuid);
+
+ info.setAttribute(QBluetoothServiceInfo::ServiceClassIds, classIds);
+ QList<QBluetoothUuid> svclids = info.serviceClassUuids();
+ QCOMPARE(svclids.count(), 2);
+ QCOMPARE(svclids.at(0), uuid);
+ QCOMPARE(svclids.at(1), QBluetoothUuid(QBluetoothUuid::SerialPort));
+}
+
QTEST_MAIN(tst_QBluetoothServiceInfo)
#include "tst_qbluetoothserviceinfo.moc"