qt5base-lts/tests/auto
Edward Welbourne 78cf89c07d Use checked string iteration in case conversions
The Unicode table code can only be safely called on valid code-points.
So code that calls it must only pass it valid Unicode data. The string
iterator's Unchecked Unchecked methods only provide this guarantee
when the string being iterated is guaranteed to be valid UTF-16; while
client code should only use QString, QStringView and friends on valid
UTF-16 data, we have no way to be sure they have respected that.

So take the few extra cycles to actually check validity in the course
of iterating strings, when the resulting code-points are to be passed
to the Unicode table look-ups. Add tests that case mapping doesn't
access Unicode tables out of range (it'll trigger the new assertion).
Added some comments to qchar.h that helped me understand surrogates.

Change-Id: Iec2c3106bf1a875bdaa1d622f6cf94d7007e281e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-29 18:15:27 +02:00
..
cmake CMake: Fix configuration of CMake tests in-build-tree 2020-07-20 18:12:23 +02:00
concurrent QtConcurrent: Introduce runWithPromise() 2020-08-19 12:46:10 +02:00
corelib Use checked string iteration in case conversions 2020-08-29 18:15:27 +02:00
dbus Deprecate the static int based API in QMetaType 2020-08-24 00:19:05 +02:00
gui Port tst_qiconhighdpi to the new QIcon::pixmap() API 2020-08-29 10:02:47 +02:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network Remove QFtp sources etc. in favor of alternate distribution 2020-08-27 18:58:21 +02:00
opengl Remove tst_QGL 2020-08-28 11:43:11 +02:00
other Avoid inifinite recursion call in tst_Compiler::cxx11_noexcept 2020-08-28 09:43:14 +00:00
printsupport QPrinterInfo: Remove deprecated methods 2020-08-25 06:48:28 +02:00
shared QWindowsFontDatabase: Check preferred family names for all fonts 2019-11-29 09:31:21 +01:00
sql QSqlite: Don't crash after binding too many placeholders 2020-08-24 13:50:55 +02:00
testlib Remove QVariant(int type, void *data, ...) constructor 2020-08-15 10:56:29 +02:00
tools Use OpenType font weights 2020-08-28 07:26:54 +02:00
widgets Use build-system to declare tests that are low-DPI 2020-08-28 22:16:53 +02:00
xml Disable deprecation warnings in some tests 2020-07-29 14:33:23 +02:00
.prev_CMakeLists.txt CMake: Regenerate subdir test projects 2020-07-09 09:38:39 +02:00
auto.pro CMake: Get tests/auto/cmake tests working 2020-07-17 09:43:04 +02:00
CMakeLists.txt CMake: Get tests/auto/cmake tests working 2020-07-17 09:43:04 +02:00
network-settings.h Revert "QAbstractSocket: deprecate 'error' member-function" 2020-02-26 23:07:52 +03:00