8#include <boost/test/unit_test.hpp>
14template <
typename MutexType>
24 }
catch (
const std::logic_error&
e) {
25 BOOST_CHECK_EQUAL(
e.what(),
"potential deadlock detected: mutex1 -> mutex2 -> mutex1");
29 #ifdef DEBUG_LOCKORDER
37template <
typename MutexType>
43template <
typename MutexType>
65template <
typename MutexType>
83 #ifdef DEBUG_LOCKORDER
98 #ifdef DEBUG_LOCKORDER
106#ifdef DEBUG_LOCKORDER
120#ifdef DEBUG_LOCKORDER
137#ifdef DEBUG_LOCKORDER
BOOST_CHECK_EXCEPTION predicates to check the specific validation error.
BOOST_AUTO_TEST_SUITE_END()
#define BOOST_CHECK_EQUAL(v1, v2)
#define BOOST_CHECK_NO_THROW(stmt)
#define BOOST_CHECK(expr)
#define WAIT_LOCK(cs, name)
#define REVERSE_LOCK(g, cs)
BOOST_AUTO_TEST_CASE(potential_deadlock_detected)
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.