From 63e9e40b73507b0c9361fc8728d4e97fd72c9ec9 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 20 Jun 2020 23:00:52 +0300 Subject: test: Add LockStackEmpty() --- src/test/sync_tests.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/test/sync_tests.cpp') diff --git a/src/test/sync_tests.cpp b/src/test/sync_tests.cpp index 36f9c9bce..19029ebd3 100644 --- a/src/test/sync_tests.cpp +++ b/src/test/sync_tests.cpp @@ -14,6 +14,7 @@ void TestPotentialDeadLockDetected(MutexType& mutex1, MutexType& mutex2) { LOCK2(mutex1, mutex2); } + BOOST_CHECK(LockStackEmpty()); bool error_thrown = false; try { LOCK2(mutex2, mutex1); @@ -21,6 +22,7 @@ void TestPotentialDeadLockDetected(MutexType& mutex1, MutexType& mutex2) BOOST_CHECK_EQUAL(e.what(), "potential deadlock detected: mutex1 -> mutex2 -> mutex1"); error_thrown = true; } + BOOST_CHECK(LockStackEmpty()); #ifdef DEBUG_LOCKORDER BOOST_CHECK(error_thrown); #else -- cgit v1.2.3