qt6-bb10/tests/auto/testlib
Marc Mutz ab910e09c7 Long live QDebug::operator<<(q(u)int128)!
Replace the ad-hoc implementation of QTest::toString() in
tst_qglobal.cpp with a QDebug stream operator, so the
QTest::toString() fall-back to QDebug::toString() kicks in.

Since the ABI issues revolving around the new int128 types are not
known, yet, avoid baking the types into the ABI by a) making the
operators constrained templates¹ and b) passing though void* to the
exported helpers. These functions return an error message if Qt was
compiled without support for int128.

Use the Thiago Trick™ (leaving obviouly dead code around for the
compiler to remove without warning) to expose more code to more
compilers. This appears to work elsewhere in Qt, so I hope it does
here, too.

This completes the minimum qint128 support so we're able to debug code
and write tests that use these types.

¹ Templates, unlike inline member functions of wholly-exported
  classes, never² become part of the ABI.

² <insert here the convoluted scenario under which this is false>

Fixes: QTBUG-117011
Change-Id: Ia4e56d26c6ffd18b7d69a7ceaed65b2211d258b2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-12-09 21:00:13 +01:00
..
initmain Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
outformat Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qabstractitemmodeltester tst_QAbstractItemModelTester: fix unittest 2023-09-08 19:17:36 +03:00
qsignalspy CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
selftests QTest: make failOnWarning() functional on temp objects destruction 2023-11-22 20:15:38 +00:00
tostring Long live QDebug::operator<<(q(u)int128)! 2023-12-09 21:00:13 +01:00
CMakeLists.txt Move the formatting of <chrono> durations to QDebug & QtTest 2023-05-06 17:54:23 +00:00