]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix test broken when using COW std::string
authorFrançois Dumont <frs.dumont@gmail.com>
Thu, 24 Oct 2024 18:30:16 +0000 (20:30 +0200)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Thu, 24 Oct 2024 18:44:10 +0000 (20:44 +0200)
libstdc++-v3/ChangeLog:

* testsuite/23_containers/unordered_map/96088.cc (test03): Fix increments
value when _GLIBCXX_USE_CXX11_ABI is equal to 0.

libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc

index b5be7d06aa0348e2b667953109b2e5795fa65682..ee41675a16bab0c4816c2db5cdb2f75e029e8690 100644 (file)
@@ -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 );