mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-25 18:51:47 +02:00
tests: Add Assertions in reverse_lock tests to exercise thread-safety annotations
This commit is contained in:
@@ -17,8 +17,10 @@ BOOST_AUTO_TEST_CASE(reverselock_basics)
|
||||
WAIT_LOCK(mutex, lock);
|
||||
|
||||
BOOST_CHECK(lock.owns_lock());
|
||||
AssertLockHeld(mutex);
|
||||
{
|
||||
REVERSE_LOCK(lock, mutex);
|
||||
AssertLockNotHeld(mutex);
|
||||
BOOST_CHECK(!lock.owns_lock());
|
||||
}
|
||||
BOOST_CHECK(lock.owns_lock());
|
||||
|
Reference in New Issue
Block a user