qt6-bb10/tests/auto/testlib
Marc Mutz 3a57885c37 tst_tostring: support computed expected values
We need an owning container to keep the data alive when the _data
function computes the expected value instead of passing it as a
literal string, so replace the QByteArrayView we used so far with a
const QByteArray.

If a test failed, print the tail ends of the failing strings. This
is useful when toString() implementations printing the operands of
the failed toString()-under-test result comparison decide to
truncate the output. It works around the fact that we both test
toString() and use toString() to report any failure.

As a drive-by, add a missing blank line between function definitions.

Amends a2551c45d4.

Pick-to: 6.6
Change-Id: I0b217aeb1a6d475df8e8b9fb821046f1cceb1a3e
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2023-12-06 09:46:55 +00: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 tst_tostring: support computed expected values 2023-12-06 09:46:55 +00:00
CMakeLists.txt Move the formatting of <chrono> durations to QDebug & QtTest 2023-05-06 17:54:23 +00:00