From b2a4b22c895b0446369d5970c114cd8cb72dda41 Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Mon, 19 Jun 2023 09:21:48 -0700 Subject: [PATCH] Remove erroneous asserts from the test suite These asserts were erroneously being removed in release builds of the tests which is never the intention --- test/unordered/erase_tests.cpp | 2 +- test/unordered/reserve_tests.cpp | 4 ++-- test/unordered/transparent_tests.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/unordered/erase_tests.cpp b/test/unordered/erase_tests.cpp index c75b33c2..80fd6eb3 100644 --- a/test/unordered/erase_tests.cpp +++ b/test/unordered/erase_tests.cpp @@ -58,7 +58,7 @@ namespace erase_tests { typename Container::key_type key = test::get_key(*x.begin()); std::size_t count = x.count(key); iterator pos = x.erase(x.begin()); - BOOST_ASSERT(BOOST_TEST(pos == x.begin())); + BOOST_TEST(pos == x.begin()); --size; BOOST_TEST(x.count(key) == count - 1); BOOST_TEST(x.size() == size); diff --git a/test/unordered/reserve_tests.cpp b/test/unordered/reserve_tests.cpp index 41bd17b1..2ea85a49 100644 --- a/test/unordered/reserve_tests.cpp +++ b/test/unordered/reserve_tests.cpp @@ -213,8 +213,8 @@ UNORDERED_AUTO_TEST (allocator_check) { typedef boost::allocator_rebind, float>::type alloc_rebound; alloc_rebound b; A a(b); - BOOST_ASSERT(alloc_rebound(a) == b); - BOOST_ASSERT(A(b) == a); + BOOST_TEST(alloc_rebound(a) == b); + BOOST_TEST(A(b) == a); } #ifdef BOOST_UNORDERED_FOA_TESTS diff --git a/test/unordered/transparent_tests.cpp b/test/unordered/transparent_tests.cpp index 9d9b8458..e6de7645 100644 --- a/test/unordered/transparent_tests.cpp +++ b/test/unordered/transparent_tests.cpp @@ -1641,7 +1641,7 @@ template void test_map_transparent_subscript(UnorderedMap*) int key_count = key::count_; map[0] = 7331; - BOOST_ASSERT(BOOST_TEST_EQ(key::count_, key_count)); + BOOST_TEST_EQ(key::count_, key_count); map[4] = 7331; BOOST_TEST_EQ(key::count_, key_count + 1); @@ -1664,7 +1664,7 @@ void test_map_non_transparent_subscript(UnorderedMap*) int key_count = key::count_; map[0] = 7331; - BOOST_ASSERT(BOOST_TEST_EQ(key::count_, key_count + 1)); + BOOST_TEST_EQ(key::count_, key_count + 1); key_count = key::count_; map[4] = 7331;