diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-06-04 15:01:30 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-11 12:03:22 +0200 |
commit | 1a9a359b9bdee646cd964fd5af13b239da79f9c9 (patch) | |
tree | c69d6c1fe6389a44856284ceaeacd05bab9b41ed /tests | |
parent | 516bc395a69f5dbe965c1e1da8580b5a6c38779f (diff) |
Provide means of translating descriptor types to user strings
Also, this patch fixes the uninitialised m_type member in the
QLowEnergyDescriptorInfo private implementation
Change-Id: I6736d5f38738490bc4f0f53908f925361f1843bd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qlowenergydescriptorinfo/tst_qlowenergydescriptorinfo.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/auto/qlowenergydescriptorinfo/tst_qlowenergydescriptorinfo.cpp b/tests/auto/qlowenergydescriptorinfo/tst_qlowenergydescriptorinfo.cpp index e53523a1..e10d248e 100644 --- a/tests/auto/qlowenergydescriptorinfo/tst_qlowenergydescriptorinfo.cpp +++ b/tests/auto/qlowenergydescriptorinfo/tst_qlowenergydescriptorinfo.cpp @@ -96,7 +96,10 @@ void tst_QLowEnergyDescriptorInfo::tst_construction() QCOMPARE(descriptorInfo.uuid(), QBluetoothUuid()); QCOMPARE(descriptorInfo.value(), QByteArray()); QCOMPARE(descriptorInfo.handle(), QString("0x0000")); - QCOMPARE(descriptorInfo.name(), QString("")); + QCOMPARE(descriptorInfo.name(), + QBluetoothUuid::descriptorToString(descriptorInfo.type())); + QCOMPARE(descriptorInfo.type(), + QBluetoothUuid::ClientCharacteristicConfiguration); } { @@ -106,7 +109,8 @@ void tst_QLowEnergyDescriptorInfo::tst_construction() QLowEnergyDescriptorInfo copyInfo = descriptorInfo; QCOMPARE(copyInfo.uuid().toString(), descriptorUuid.toString()); - QCOMPARE(copyInfo.name(), QString("")); + QCOMPARE(copyInfo.name(), + QBluetoothUuid::descriptorToString(copyInfo.type())); copyInfo.setValue(QByteArray("test")); QCOMPARE(copyInfo.value(), QByteArray("test")); @@ -121,7 +125,8 @@ void tst_QLowEnergyDescriptorInfo::tst_construction() QCOMPARE(copyInfo.uuid(), alternateDescriptorUuid); QCOMPARE(copyInfo.value(), QByteArray()); QCOMPARE(copyInfo.handle(), QString("0x0000")); - QCOMPARE(copyInfo.name(), QString("")); + QCOMPARE(copyInfo.name(), + QBluetoothUuid::descriptorToString(copyInfo.type())); } } |