From 9122bfcc4d332e95209a954785a700bf33adce59 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(). Pick-to: 6.6 6.5 6.2 Change-Id: Ibec66d4b7301e71509497a06b1b65e5cf9d108c2 Reviewed-by: Ivan Solovev --- 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 7a31300c..6cff5c2e 100644 --- a/tests/auto/qbluetoothuuid/tst_qbluetoothuuid.cpp +++ b/tests/auto/qbluetoothuuid/tst_qbluetoothuuid.cpp @@ -246,6 +246,8 @@ void tst_QBluetoothUuid::tst_conversion() if (constructUuid16) { QBluetoothUuid uuid(uuid16); + QCOMPARE(uuid, QBluetoothUuid(uuidS)); + bool ok; QCOMPARE(uuid.toUInt16(&ok), uuid16); @@ -266,6 +268,8 @@ void tst_QBluetoothUuid::tst_conversion() if (constructUuid32) { QBluetoothUuid uuid(uuid32); + QCOMPARE(uuid, QBluetoothUuid(uuidS)); + bool ok; quint16 tmp = uuid.toUInt16(&ok); @@ -289,6 +293,8 @@ void tst_QBluetoothUuid::tst_conversion() if (constructUuid128) { QBluetoothUuid uuid(uuid128); + QCOMPARE(uuid, QBluetoothUuid(uuidS)); + bool ok; quint16 tmpUuid16 = uuid.toUInt16(&ok);