qt5base-lts/tests/auto/corelib/text
Giuseppe D'Angelo 2d95b75345 QByteArray: fix isUpper/isLower
577d698b8e changed QString::isUpper /
isLower behaviors to match Unicode semantics: a string is uppercase
if it's identical to its own toLower/toUpper folding. These semantics
come from Unicode so they're not up for debate.

That commit however left QByteArray untouched. Generally speaking, we
want to move away from QByteArray as "text storage" -- this has
partially happened between Qt 5 and Qt 6, where QByteArray went from
Latin-1 semantics to ASCII semantics. Still, QByteArray offers
toUpper/toLower and isUpper/isLower and all this family of functions
should be consistent in behavior.

Apply the same fix that was applied to QString.

[ChangeLog][Important Behavior Changes] The semantics of
QByteArray::isLower() and QByteArray::isUpper() have been changed. Now
lowercase (resp. uppercase) byte arrays are allowed to contain any
character; a byte array is considered lowercase (resp. uppercase) if
it's equal to its own toLower() (resp. toUpper()) folding. For instance,
the "abc123" byte array is now considered to be lowercase.
Previously, the isLower() (resp. isUpper()) functions checked whether
the byte array only contained ASCII lowercase (resp. uppercase)
characters, and was at least 1 character long. This had the side effect
that byte array containing ASCII non-letters (e.g. numbers, symbols,
etc.) were not lowercase nor uppercase.

[ChangeLog][QtCore][QByteArray] QByteArray::isLower() and
QByteArray::isUpper() now work correctly with empty byte arrays. The
semantics of these functions have been changed.

Pick-to: 6.3 6.2
Fixes: QTBUG-100107
Change-Id: Id56a42f01b2d1af5387bf0e6ccff0f824f757155
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-01-25 15:29:20 +01:00
..
qanystringview Short live q20::ssize()! 2021-11-20 01:38:41 +00:00
qbytearray QByteArray: fix isUpper/isLower 2022-01-25 15:29:20 +01:00
qbytearrayapisymmetry Silence compiler warning 2021-10-06 15:05:20 +02:00
qbytearraylist QByteArrayList: add join(QByteArrayView) 2021-11-04 01:16:16 +01:00
qbytearraymatcher Q(Static)ByteArrayMatcher: manage indexIn() overloads 2022-01-23 09:48:28 +01:00
qbytearrayview Add QByteArrayView::trimmed() 2021-08-11 22:32:42 +02:00
qbytedatabuffer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qchar Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qcollator Fix tst_qcollator run time issue on INTEGRITY device 2022-01-12 21:49:02 +00:00
qlatin1string QLatin1String: Add a constructor taking QByteArrayView 2021-06-12 03:08:59 +02:00
qlocale QLocale: Extend support for language codes 2021-12-09 03:45:08 +01:00
qregularexpression Check that QStringView::split() w/rvalue QRegularExpression returns valid data 2021-11-29 20:04:38 +00:00
qstring QLatin1String: perform the comparison to another QL1S using memcmp() 2022-01-17 22:17:01 +00:00
qstring_no_cast_from_bytearray testlib: Deprecate QWARN() in favor of qWarning() 2021-08-04 19:31:51 +02:00
qstringapisymmetry QString et al: fix lastIndexOf() API asymmetry 2021-12-02 16:05:33 +00:00
qstringbuilder tst_QStringBuilder: remove test that doesn't test anything 2021-12-22 13:01:25 +01:00
qstringconverter Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qstringiterator Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstringlist tst_QStringList: check that join(u'\0') embeds NULs 2021-12-28 23:09:44 +01:00
qstringmatcher Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstringtokenizer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstringview Remove checks for features available in C++17 2021-10-02 17:54:39 +02:00
qtextboundaryfinder Remove unused .qrc files 2022-01-17 23:17:01 +01:00
qunicodetools Add additional grapheme, word, and sentence break class tests from tr29 2021-11-10 09:44:03 +01:00
shared QString/QByteArray::number(double): Test big numbers 2021-08-17 03:53:45 +02:00
CMakeLists.txt Add an initial tst_QAnyStringView 2021-11-18 17:13:19 +00:00