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 9122bfcc4d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2023-08-11 17:39:54 +02:00 committed by Qt Cherry-pick Bot
parent daefa8e260
commit 4721db7cf4
1 changed files with 6 additions and 0 deletions

View File

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