summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-08-11 17:39:54 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-08-12 12:55:12 +0000
commit4721db7cf4552c2c6bb5744910dc2cd8a2f94f86 (patch)
tree8562b933e3dba9d9d0ae8d431cb7584df18845c6
parentdaefa8e26073f8d03f9b87af3bfd70e4423c8fb0 (diff)
tst_QBluetoothUuid: add tests for (QString) ctor
We already have the string representation QFETCH()ed, so let's use it. This also seems to test op<<, by QCOMPARE() falling back to QDebug::toString(). Change-Id: Ibec66d4b7301e71509497a06b1b65e5cf9d108c2 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 9122bfcc4d332e95209a954785a700bf33adce59) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/qbluetoothuuid/tst_qbluetoothuuid.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qbluetoothuuid/tst_qbluetoothuuid.cpp b/tests/auto/qbluetoothuuid/tst_qbluetoothuuid.cpp
index 63a77a84..604fca49 100644
--- a/tests/auto/qbluetoothuuid/tst_qbluetoothuuid.cpp
+++ b/tests/auto/qbluetoothuuid/tst_qbluetoothuuid.cpp
@@ -236,6 +236,8 @@ void tst_QBluetoothUuid::tst_conversion()
if (constructUuid16) {
QBluetoothUuid uuid(uuid16);
+ QCOMPARE(uuid, QBluetoothUuid(uuidS));
+
bool ok;
QCOMPARE(uuid.toUInt16(&ok), uuid16);
@@ -254,6 +256,8 @@ void tst_QBluetoothUuid::tst_conversion()
if (constructUuid32) {
QBluetoothUuid uuid(uuid32);
+ QCOMPARE(uuid, QBluetoothUuid(uuidS));
+
bool ok;
quint16 tmp = uuid.toUInt16(&ok);
@@ -275,6 +279,8 @@ void tst_QBluetoothUuid::tst_conversion()
if (constructUuid128) {
QBluetoothUuid uuid(uuid128);
+ QCOMPARE(uuid, QBluetoothUuid(uuidS));
+
bool ok;
quint16 tmpUuid16 = uuid.toUInt16(&ok);