tests: Add Assertions in reverse_lock tests to exercise thread-safety annotations

This commit is contained in:
Cory Fields committed 2025-08-22 14:25:39 +00:00
1 parent c88b1cbf57
commit 3ddd554d31
1 file changed
+2
+2
View File
@@ -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());