Skip to content

Commit c84b21b

Browse files
isidorostsahkaiser
authored andcommitted
reloc test, loosen test requirements
1 parent 8e1f27f commit c84b21b

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

libs/core/algorithms/tests/unit/algorithms/uninitialized_relocate_par.cpp

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -271,23 +271,9 @@ int hpx_main()
271271
non_trivially_relocatable_struct_throwing::move_count.load(),
272272
non_trivially_relocatable_struct_throwing::dtor_count.load());
273273

274-
// K move constructors were called
274+
// After catching, all objects must be destroyed
275275
HPX_TEST_MSG(
276-
non_trivially_relocatable_struct_throwing::move_count.load() == K,
277-
msg);
278-
279-
// K - 1 destructors were called to balance out the move constructors
280-
// (- 1 because the last move constructor throws)
281-
// and then N + 1 destructors were called: K on the old range and
282-
// N - (K - 1) = N - K + 1 on the new range
283-
HPX_TEST_MSG(
284-
non_trivially_relocatable_struct_throwing::dtor_count.load() ==
285-
N + K,
286-
msg);
287-
288-
// It stops at K, so K-1 move-destruct pairs have been executed
289-
// after this N - (K - 1) destructs will be done on the old range
290-
// and K - 1 on the new range. giving 2*N total destructs
276+
non_trivially_relocatable_struct_throwing::count == 0, msg);
291277

292278
std::free(mem1);
293279
std::free(mem2);

0 commit comments

Comments
 (0)