ardour
mutex_test.cc
Go to the documentation of this file.
1 #include "mutex_test.h"
2 
4 
5 using namespace std;
6 
8 {
9 }
10 
11 void
13 {
14  Glib::Threads::Mutex::Lock lm (m_mutex);
15 
16  CPPUNIT_ASSERT (lm.locked());
17 
18  /* This will fail on POSIX systems but not on some older versions of glib
19  * on win32 as TryEnterCriticalSection is used and it will return true
20  * as CriticalSection is reentrant and fail the assertion.
21  */
22  CPPUNIT_ASSERT (!m_mutex.trylock());
23 
24 }
Definition: Beats.hpp:239
void testBasic()
Definition: mutex_test.cc:12
CPPUNIT_TEST_SUITE_REGISTRATION(MutexTest)