25 BOOST_TEST(mlock.
size() == 0);
32 BOOST_TEST(mlock.
check(
"A"));
34 BOOST_TEST(mlock.
size() == 1);
38 mlock.
add(
"B",
false);
39 BOOST_TEST(mlock.
check(
"A"));
41 BOOST_TEST(!mlock.
check(
"B"));
43 BOOST_TEST(mlock.
size() == 2);
48 BOOST_TEST(mlock.
check(
"A"));
49 BOOST_TEST(mlock.
check(
"B"));
51 BOOST_TEST(mlock.
size() == 2);
56 BOOST_TEST(!mlock.
check(
"A"));
57 BOOST_TEST(!mlock.
check(
"B"));
63 BOOST_TEST(mlock.
check(
"A"));
64 BOOST_TEST(mlock.
check(
"B"));
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(MultiLockTest)
#define PRECICE_TEST(...)
Class handling multiple locks allowing global lock and unlock operations.
size_t countLocked() const
Returns the count of locked locks.
bool check(const K &name) const
Checks the status of a lock.
size_t countUnlocked() const
Returns the count of unlocked locks.
void add(Key name, bool state)
Adds a lock with a given state.
void lock(const K &name)
Locks a given lock.
void lockAll() noexcept
Locks all known locks.
void unlockAll() noexcept
Unlocks all known locks.
bool checkAll() const noexcept
Checks whether all locks are locked.
size_type size() const noexcept
Returns the total count of locks.
bool contains(const K &name) const noexcept
Checks whether a lock is known.
void unlock(const K &name)
Unlocks a given lock.
contains precice-related utilities.
Main namespace of the precice library.