From ef895869b45f53836cbf21e133c191aea96c0316 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 11 Apr 2022 17:08:42 +0200 Subject: QVarLengthArray: add missing (size, value) ctor Extend the corresponding test in tst_containerapisymmetry. [ChangeLog][QtCore][QVarLengthArray] Added (size, value) constructor. Fixes: QTBUG-102469 Change-Id: I4802eebe6ba1a6835e4d6f41e1d3db2a0d7c7894 Reviewed-by: Sona Kurazyan Reviewed-by: Thiago Macieira --- .../tools/containerapisymmetry/tst_containerapisymmetry.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/auto/corelib/tools/containerapisymmetry') diff --git a/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp b/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp index dabf9dd7f4..1c6e6fdb25 100644 --- a/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp +++ b/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp @@ -750,6 +750,18 @@ void tst_ContainerApiSymmetry::resize_impl() const c.resize(4, V(5)); QCOMPARE(c.size(), S(4)); QCOMPARE(c.back(), V(5)); + + // ctor/resize symmetry: + { + Container c1(S(5), V(4)); + QCOMPARE(c1.size(), S(5)); + + Container c2; + c2.resize(S(5), V(4)); + QCOMPARE(c2.size(), S(5)); + + QCOMPARE(c1, c2); + } } template -- cgit v1.2.3