From 24eeb672756bba99be0b04273319195d51feb2f7 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 18 Jan 2022 22:12:57 +0200 Subject: [PATCH] Update reserve_tests to pass for power of two resize policy --- test/unordered/reserve_tests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unordered/reserve_tests.cpp b/test/unordered/reserve_tests.cpp index 85841e19..fbaa99f6 100644 --- a/test/unordered/reserve_tests.cpp +++ b/test/unordered/reserve_tests.cpp @@ -160,9 +160,9 @@ template void rehash_tests() // properly deallocate the current bucket array and then reallocate the // larger one // - std::size_t prev_count = count; + std::size_t prev_count = s.bucket_count(); - count = s.bucket_count() + 1; + count = s.bucket_count() + 2; s.rehash(count); BOOST_TEST_GT(num_allocations, prev_allocations);