1 #include "mutex_test.h"
3 CPPUNIT_TEST_SUITE_REGISTRATION (MutexTest);
7 MutexTest::MutexTest ()
12 MutexTest::testBasic ()
14 Glib::Threads::Mutex::Lock lm (m_mutex);
16 CPPUNIT_ASSERT (lm.locked());
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.
22 CPPUNIT_ASSERT (!m_mutex.trylock());