From: François Dumont Date: Thu, 24 Oct 2024 18:30:16 +0000 (+0200) Subject: libstdc++: Fix test broken when using COW std::string X-Git-Tag: basepoints/gcc-16~4939 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d01dc97a26d2f5034ca135f46094aa52c44cc90a;p=thirdparty%2Fgcc.git libstdc++: Fix test broken when using COW std::string libstdc++-v3/ChangeLog: * testsuite/23_containers/unordered_map/96088.cc (test03): Fix increments value when _GLIBCXX_USE_CXX11_ABI is equal to 0. --- diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc index b5be7d06aa03..ee41675a16ba 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc @@ -233,9 +233,8 @@ test03() um.insert(v.begin(), v.end()); VERIFY( um.size() == 1 ); - // Allocate array of buckets, a node, the std::string value and the - // std::string key (unless COW). - constexpr std::size_t increments = _GLIBCXX_USE_CXX11_ABI ? 4 : 3; + // Allocate array of buckets, a node, and the 2 std::string (unless COW). + constexpr std::size_t increments = _GLIBCXX_USE_CXX11_ABI ? 4 : 2; VERIFY( __gnu_test::counter::count() == origin + increments ); VERIFY( __gnu_test::counter::get()._M_increments == increments );