From 4721db7cf4552c2c6bb5744910dc2cd8a2f94f86 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 11 Aug 2023 17:39:54 +0200 Subject: [PATCH] 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 (cherry picked from commit 9122bfcc4d332e95209a954785a700bf33adce59) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/qbluetoothuuid/tst_qbluetoothuuid.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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);