Add QTextCodec test that triggers an assertion in QUtf32
Thiago recently replaced a bogus assertion with length control in
QUtf32::convertFromUnicode() but there was no way to test it from
qtbase's public API. However, QTextCodec still exercises the relevant
overload, so add a test for it here, which duly triggers the
assertion:
1: PASS : tst_QTextCodec::utf32Codec(empty))
1: QFATAL : tst_QTextCodec::utf32Codec(Chakma digits) ASSERT: "end - ba.constData() == length" in file /home/eddy/work/Qt-dev/qtbase/src/corelib/text/qstringconverter.cpp, line 1030
1: FAIL! : tst_QTextCodec::utf32Codec(Chakma digits) Received a fatal error.
1: Loc: [/home/eddy/work/Qt-dev/qtbase/src/corelib/text/qstringconverter.cpp(1030)]
The test passes with Thiago's fix.
Pick-to: 6.2
Task-number: QTBUG-97122
Change-Id: Ib413426545892e0153bd892627e926292561b67b
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>