From c84b21b79199553719ab36ae5c0738aa9766a69e Mon Sep 17 00:00:00 2001 From: isidorostsa Date: Sun, 15 Oct 2023 01:14:08 +0300 Subject: [PATCH] reloc test, loosen test requirements --- .../algorithms/uninitialized_relocate_par.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/libs/core/algorithms/tests/unit/algorithms/uninitialized_relocate_par.cpp b/libs/core/algorithms/tests/unit/algorithms/uninitialized_relocate_par.cpp index 509ebeaf5d85..47d402aea59a 100644 --- a/libs/core/algorithms/tests/unit/algorithms/uninitialized_relocate_par.cpp +++ b/libs/core/algorithms/tests/unit/algorithms/uninitialized_relocate_par.cpp @@ -271,23 +271,9 @@ int hpx_main() non_trivially_relocatable_struct_throwing::move_count.load(), non_trivially_relocatable_struct_throwing::dtor_count.load()); - // K move constructors were called + // After catching, all objects must be destroyed HPX_TEST_MSG( - non_trivially_relocatable_struct_throwing::move_count.load() == K, - msg); - - // K - 1 destructors were called to balance out the move constructors - // (- 1 because the last move constructor throws) - // and then N + 1 destructors were called: K on the old range and - // N - (K - 1) = N - K + 1 on the new range - HPX_TEST_MSG( - non_trivially_relocatable_struct_throwing::dtor_count.load() == - N + K, - msg); - - // It stops at K, so K-1 move-destruct pairs have been executed - // after this N - (K - 1) destructs will be done on the old range - // and K - 1 on the new range. giving 2*N total destructs + non_trivially_relocatable_struct_throwing::count == 0, msg); std::free(mem1); std::free(mem2);