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

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

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

revision 62 by schoenebeck, Sun May 2 17:45:43 2004 UTC revision 63 by schoenebeck, Tue May 4 18:52:24 2004 UTC
# Line 10  Line 10 
10  // the Thread class we want to test  // the Thread class we want to test
11  #include "../common/Thread.h"  #include "../common/Thread.h"
12    
13    // we need that to check if our thread is killable even if waiting for a condition
14    #include "../common/Condition.h"
15    
16  class ThreadTest : public CppUnit::TestFixture {  class ThreadTest : public CppUnit::TestFixture {
17    
18      CPPUNIT_TEST_SUITE(ThreadTest);      CPPUNIT_TEST_SUITE(ThreadTest);
# Line 17  class ThreadTest : public CppUnit::TestF Line 20  class ThreadTest : public CppUnit::TestF
20      CPPUNIT_TEST(testSignalStopThread);      CPPUNIT_TEST(testSignalStopThread);
21      CPPUNIT_TEST(testRelaunchThread);      CPPUNIT_TEST(testRelaunchThread);
22      CPPUNIT_TEST(testStopThread);      CPPUNIT_TEST(testStopThread);
23        CPPUNIT_TEST(testThreadKillableWhenWaiting);
24      CPPUNIT_TEST_SUITE_END();      CPPUNIT_TEST_SUITE_END();
25    
26      private:      private:
# Line 39  class ThreadTest : public CppUnit::TestF Line 43  class ThreadTest : public CppUnit::TestF
43                  HelperThread(DummyThread* pDummyThread);                  HelperThread(DummyThread* pDummyThread);
44                  int Main();                  int Main();
45          };          };
46    
47            // this simulates a thread that is waiting for a condition (thus sleeping til then)
48            class WaitingThread : public Thread {
49                public:
50                    WaitingThread();
51                    int Main();
52                private:
53                    Condition condition;
54            };
55      public:      public:
56          void setUp() {          void setUp() {
57          }          }
# Line 50  class ThreadTest : public CppUnit::TestF Line 63  class ThreadTest : public CppUnit::TestF
63          void testSignalStopThread();          void testSignalStopThread();
64          void testRelaunchThread();          void testRelaunchThread();
65          void testStopThread();          void testStopThread();
66            void testThreadKillableWhenWaiting();
67  };  };
68    
69  #endif // __LS_THREADTEST_H__  #endif // __LS_THREADTEST_H__

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

  ViewVC Help
Powered by ViewVC