qt5base-lts/tests/auto/corelib/tools/containerapisymmetry
Marc Mutz 3b0536bbe8 tst_ContainerApiSymmetry: make assign_impl() robust w.r.t. overallocation
The parameter passed to reserve() is just a hint. The container
implementation is free to choose a larger capacity, and some do
(e.g. QList in prepend optimization mode).

Fix the test by querying the container for its post-make<>()
capacity() and taking a larger-than-expected initial capacity() into
account when later re-checking the capacity().

Change-Id: Id8f26f14e8df9d685ca2387ec4a52d74fea7cb9d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-13 16:58:36 +02:00
..
.gitignore Add a test for container API symmetry 2017-04-07 08:32:24 +00:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
tst_containerapisymmetry.cpp tst_ContainerApiSymmetry: make assign_impl() robust w.r.t. overallocation 2023-05-13 16:58:36 +02:00