qt5base-lts/tests/auto/corelib/tools
Dennis Oberst 60f739f51f tst_ContainerApiSymmetry: make assign_impl() more robust
Refactor the 'CHECK' macro to eliminate the capacity check and
explicitly verify that no reallocation occurred. The previous
implementation had to pass constants to suppress the issue arising
from differing growth rates between implementations.

Additionally, improve the 'std::stringstream' versions of the test
by incorporating the correct values. In the previous implementation,
the usage of:

    auto tData = V(9);
    ~~~
    std::stringstream ss("9 9 ");

had several issues. Firstly, it used the wrong test data since the
container's value_type of '(char) 9' resulted in a tab character '\t',
which was not accurately reflected in the stringstream assignment.
Secondly, this value caused problems in how stringstreams interprets it.

To address these issues, let's make the following improvements:

1. Use a default test value of 65 instead of (char) 9. This value, which
represents the character 'A', is less likely to cause errors and is more
intuitive.
2. Use the tData variable for the assignments in the stringstream. This
ensures that the correct data from the container is used.
3. Change the test value between the assign() calls to verify that the
container's contents are successfully overwritten.

These changes ensure, that the test cases are more accurate and
reliable.

Amends: 3b0536bbe8.

Change-Id: I9441c4818106bf93e93a1a5d2d2d54c89d80e7b0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-01 18:39:25 +00:00
..
collections Replace ushort*/uint* with char16_t*/char32_t* in private API [1] 2023-03-15 20:25:57 +00:00
containerapisymmetry tst_ContainerApiSymmetry: make assign_impl() more robust 2023-06-01 18:39:25 +00:00
qalgorithms tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qarraydata tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qatomicscopedvaluerollback Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qbitarray tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qcache tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qcommandlineparser Clean up phrasing of --help-all and other help options 2023-05-15 14:02:43 +02:00
qcontiguouscache tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qcryptographichash QCryptographicHash: check addData() with null QByteArrayView 2023-03-17 00:41:33 +01:00
qduplicatetracker tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qeasingcurve tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qexplicitlyshareddatapointer tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qflatmap tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qfreelist Fix tst_qfreelist when build with unity 2023-03-14 17:28:43 +01:00
qhash QMultiHash: fix missing update to m_size 2023-04-04 08:59:32 -03:00
qhashfunctions tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qhashseed Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qline tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qlist QList: re-use the prepend buffer, if any, on assign() 2023-05-17 06:44:39 +02:00
qmacautoreleasepool Darwin: Remove QMacAutoReleasePool heap allocation detection 2023-05-15 13:51:00 +00:00
qmakearray tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qmap tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qmargins Short live QT_ENABLE_P0846_SEMANTICS_FOR! 2023-03-22 15:59:10 +00:00
qmessageauthenticationcode tst_QMessageAuthenticationCode: avoid setKey() calls 2023-03-20 14:42:11 +01:00
qoffsetstringarray tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qpair tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qpoint Short live QT_ENABLE_P0846_SEMANTICS_FOR! 2023-03-22 15:59:10 +00:00
qpointf Short live QT_ENABLE_P0846_SEMANTICS_FOR! 2023-03-22 15:59:10 +00:00
qqueue tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qrect tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qringbuffer tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qscopedpointer tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qscopedvaluerollback tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qscopeguard tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qset Remove unused variables 2023-04-19 12:55:02 +02:00
qsharedpointer QThread: add sleep(std::chrono::nanoseconds) overload 2023-03-13 23:26:28 +02:00
qsize Short live QT_ENABLE_P0846_SEMANTICS_FOR! 2023-03-22 15:59:10 +00:00
qsizef Short live QT_ENABLE_P0846_SEMANTICS_FOR! 2023-03-22 15:59:10 +00:00
qstl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qtaggedpointer tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qtimeline tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qvarlengtharray tst_qvarlengtharray: add test for QVLA(n) ctor 2023-03-01 18:14:39 +00:00
qversionnumber tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
CMakeLists.txt Fix tst_qfreelist when build with unity 2023-03-14 17:28:43 +01:00