diff --git a/tests/std/include/test_atomic_wait.hpp b/tests/std/include/test_atomic_wait.hpp index 7be16c0d1af..a3d9b4471c2 100644 --- a/tests/std/include/test_atomic_wait.hpp +++ b/tests/std/include/test_atomic_wait.hpp @@ -147,10 +147,14 @@ void test_pad_bits_impl(const std::chrono::steady_clock::duration waiting_durati c.store(new_value); c.notify_one(); +#ifdef CAN_FAIL_ON_TIMING_ASSUMPTION std::this_thread::sleep_for(waiting_duration); assert(trigger); - w1.join(); +#else // ^^^ CAN_FAIL_ON_TIMING_ASSUMPTION / !CAN_FAIL_ON_TIMING_ASSUMPTION vvv + w1.join(); + assert(trigger); +#endif // ^^^ !CAN_FAIL_ON_TIMING_ASSUMPTION ^^^ } template