From aa872148645351a346d34db60cd0b8b1235fed1c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 12 Mar 2025 12:54:38 -0700 Subject: [PATCH] tst_QUuid: make big-endian runs not fail As far as I can tell, QUuid is working correctly on big endian platforms. But it stores the integers in such a weird fashion (I wish to fix that for Qt 7) that this test is non-obvious. I don't have a big-endian machine to test this with. Anyone interested is welcome to submit patches. Fixes: QTBUG-134634 Pick-to: 6.8 6.9 Change-Id: I2415be976d1d880d1525fffdf525dcf4f21aaa70 Reviewed-by: Shawn Rutledge --- tests/auto/corelib/plugin/quuid/tst_quuid.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp index 332a5be041a..26018db7dbc 100644 --- a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp +++ b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp @@ -295,6 +295,10 @@ void tst_QUuid::id128() void tst_QUuid::uint128() { #ifdef QT_SUPPORTS_INT128 + if (QSysInfo::ByteOrder == QSysInfo::BigEndian) + QSKIP("Not implemented for big endian. Feel free to submit fixes."); + + // {fc69b59e-cc34-4436-a43c-ee95d128b8c5} constexpr quint128 u = Q_UINT128_C(0xfc69b59e'cc344436'a43cee95'd128b8c5); // This is LE constexpr quint128 be = qToBigEndian(u); constexpr QUuid uuid = QUuid::fromUInt128(be);