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 <ivan.solovev@qt.io>
This commit is contained in:
Marc Mutz 2023-08-11 17:39:54 +02:00
parent 85e4b9f7c6
commit 9122bfcc4d
1 changed files with 6 additions and 0 deletions

View File

@ -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);