qt5base-lts/tests/auto/corelib/text
Marc Mutz 8420d3e0b2 tst_QString: test with QT_RESTRICTED_CAST_FROM_ASCII, too
QtBase didn't contain any checks for QT_RESTRICTED_CAST_FROM_ASCII, so
a recent addition to the QString::append/insert/prepend overload set
made calls with C string literal arguments ambiguous without the CI
noticing. We had a similar problem with QString::multiArg.

To increase test coverage, we now run tst_qstring two times:

- without any define
- with QT_RESTRICTED_CAST_FROM_ASCII (lots of changes necessary)

Most removals are expected, because they disable tests that check the
implicit conversions from QByteArray and const char*, but the
relational operators with QLatin1String objects might warrant fixing.

In some places, when the conversion wasn't the functionality under
test, replaced C string literals or QByteArrays with QLatin1String.

We should also test with QT_NO_CAST_FROM_ASCII, but that's even larger
surgery.

QString doesn't have a ctor from std::nullptr_t, so QString s =
nullptr; doesn't compile in C++17 mode, but does in C++20 mode, due to
the const char8_t* ctor.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I0c5a31719a4b8dd585dd748e0ca0d99964866064
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-22 11:16:02 +00:00
..
qanystringview Make XmlStringRef convertible to QAnyStringView/QStringView 2022-11-29 20:03:06 +00:00
qbytearray tst_QByteArray/tst_QString: use new QtMiscUtils::toAsciiUpper() 2022-12-20 14:16:31 +01:00
qbytearray_large tst_QByteArrayLarge::initTestCase: Skip tests under ASAN 2022-11-30 04:50:37 +01:00
qbytearrayapisymmetry QByteArrayApiSymmetry: silence two clang warnings 2022-12-13 14:41:29 +02:00
qbytearraylist Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qbytearraymatcher Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qbytearrayview Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qbytedatabuffer Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qchar tst_QChar::fromUcs4(): deduplicate a test-case 2022-10-18 14:13:28 +02:00
qcollator Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qlatin1stringmatcher Add Boyer-Moore Latin-1 string searcher with optional case sensitivity 2022-12-08 17:56:47 +01:00
qlatin1stringview QtBase tests: remove QT_DISABLE_DEPRECATED_UP_TO defines 2022-08-24 22:08:49 +02:00
qlocale Adapt corelib to use QTimeZone in place of Qt::TimeSpec 2022-12-09 16:16:48 +01:00
qregularexpression tst_QRE::wildcard(): use more informative data row tags 2022-10-11 11:24:11 +02:00
qstring tst_QString: test with QT_RESTRICTED_CAST_FROM_ASCII, too 2022-12-22 11:16:02 +00:00
qstring_no_cast_from_bytearray Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qstringapisymmetry QAnyStringView: add substringing operations 2022-12-08 18:00:16 +00:00
qstringbuilder Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qstringconverter Long live QUtf8::convertFromLatin1()! 2022-11-02 17:21:28 +01:00
qstringiterator Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qstringlist Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qstringmatcher Reduce foldCasing of the needle in Boyer-Moore QString searches 2022-09-22 18:05:44 +02:00
qstringtokenizer Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qstringview Make XmlStringRef convertible to QAnyStringView/QStringView 2022-11-29 20:03:06 +00:00
qtextboundaryfinder Update UCD to Revision 30 2022-10-11 14:10:59 +00:00
qunicodetools Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
shared Provide optTitle for a NumberDoubleTestData testcase that needs it 2022-10-11 11:21:38 +02:00
CMakeLists.txt Add Boyer-Moore Latin-1 string searcher with optional case sensitivity 2022-12-08 17:56:47 +01:00