/[svn]/linuxsampler/trunk/src/testcases/MutexTest.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/testcases/MutexTest.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 63 by schoenebeck, Tue May 4 18:52:24 2004 UTC revision 3548 by schoenebeck, Wed Jul 31 09:35:10 2019 UTC
# Line 13  Line 13 
13  // we need an additional thread to test the Mutex class  // we need an additional thread to test the Mutex class
14  #include "../common/Thread.h"  #include "../common/Thread.h"
15    
16    using namespace LinuxSampler;
17    
18  class MutexTest : public CppUnit::TestFixture {  class MutexTest : public CppUnit::TestFixture {
19    
20      CPPUNIT_TEST_SUITE(MutexTest);      CPPUNIT_TEST_SUITE(MutexTest);
21        CPPUNIT_TEST(printTestSuiteName);
22      CPPUNIT_TEST(testLockAndUnlockBySingleThread);      CPPUNIT_TEST(testLockAndUnlockBySingleThread);
23      CPPUNIT_TEST(testLock);      CPPUNIT_TEST(testLock);
24      CPPUNIT_TEST(testUnlock);      CPPUNIT_TEST(testUnlock);
# Line 32  class MutexTest : public CppUnit::TestFi Line 35  class MutexTest : public CppUnit::TestFi
35    
36                  ConcurrentThread();                  ConcurrentThread();
37                  int Main();                  int Main();
38                    using Thread::SignalStartThread; // make method public
39          };          };
40    
41          // dummy thread we use to check if the Mutex falsely blcoks if we do a double lock and to avoid that our unit test main thread gets blocked          // dummy thread we use to check if the Mutex falsely blcoks if we do a double lock and to avoid that our unit test main thread gets blocked
# Line 41  class MutexTest : public CppUnit::TestFi Line 45  class MutexTest : public CppUnit::TestFi
45    
46                  DummyThread();                  DummyThread();
47                  int Main();                  int Main();
48                    using Thread::SignalStartThread; // make method public
49              private:              private:
50                  Mutex mutex;                  Mutex mutex;
51          };          };
# Line 50  class MutexTest : public CppUnit::TestFi Line 55  class MutexTest : public CppUnit::TestFi
55          void setUp();          void setUp();
56          void tearDown();          void tearDown();
57    
58            void printTestSuiteName();
59    
60          void testLockAndUnlockBySingleThread();          void testLockAndUnlockBySingleThread();
61          void testLock();          void testLock();
62          void testUnlock();          void testUnlock();

Legend:
Removed from v.63  
changed lines
  Added in v.3548

  ViewVC Help
Powered by ViewVC