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

Annotation of /linuxsampler/trunk/src/testcases/LSCPTest.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1221 - (hide annotations) (download) (as text)
Wed Jun 6 18:50:03 2007 UTC (17 years ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 1895 byte(s)
* fixed several issues in fundamental "Thread" class: set scheduling
  policy and priority on thread level, set a minimum stack size for
  thread (TODO: a reasonable value yet to be tested), bugfix: non-RT
  threads simply inherited properties of starting thread instead of
  setting their own policy and priority
* updated and fixed test cases (haven't been touched in a while, but
  are now all running successfully through all cases)

1 schoenebeck 211 #ifndef __LS_LSCPTEST_H__
2     #define __LS_LSCPTEST_H__
3    
4     #include <cppunit/TestFixture.h>
5     #include <cppunit/extensions/HelperMacros.h>
6    
7     #include <unistd.h>
8     #include <sys/socket.h>
9     #include <netinet/in.h>
10     #include <netinet/tcp.h>
11     #include <arpa/inet.h>
12     #include <netdb.h>
13    
14     #include <string>
15     #include <vector>
16    
17     #include "../Sampler.h"
18     #include "../network/lscpserver.h"
19    
20     using namespace std;
21 schoenebeck 1221 using namespace LinuxSampler;
22 schoenebeck 211
23     class LSCPTest : public CppUnit::TestFixture {
24    
25     CPPUNIT_TEST_SUITE(LSCPTest);
26     CPPUNIT_TEST(printTestSuiteName);
27     CPPUNIT_TEST(testLaunchLSCPServer);
28     CPPUNIT_TEST(testConnectToLSCPServer);
29     CPPUNIT_TEST(test_ADD_CHANNEL);
30     CPPUNIT_TEST(test_GET_CHANNELS);
31     CPPUNIT_TEST(test_REMOVE_CHANNEL);
32 schoenebeck 217 CPPUNIT_TEST(test_GET_AUDIO_OUTPUT_CHANNEL_PARAMETER_INFO);
33 schoenebeck 224 CPPUNIT_TEST(test_SET_ECHO);
34 schoenebeck 211 CPPUNIT_TEST(testShutdownLSCPServer);
35     CPPUNIT_TEST_SUITE_END();
36    
37     private:
38     bool launchLSCPServer();
39     bool shutdownLSCPServer();
40    
41     bool connectToLSCPServer();
42     bool closeConnectionToLSCPServer();
43    
44     void sendCommandToLSCPServer(string cmd);
45 schoenebeck 1221 string receiveSingleLineAnswerFromLSCPServer(uint timeout_seconds = 0) throw (Exception);
46     vector<string> receiveMultiLineAnswerFromLSCPServer(uint timeout_seconds = 0) throw (Exception);
47     string receiveAnswerFromLSCPServer(string delimiter, uint timeout_seconds = 0) throw (Exception);
48 schoenebeck 224 void clearInputBuffer();
49 schoenebeck 211 public:
50     void setUp();
51     void tearDown();
52    
53     void printTestSuiteName();
54    
55     void testLaunchLSCPServer();
56     void testConnectToLSCPServer();
57     void test_ADD_CHANNEL();
58     void test_GET_CHANNELS();
59     void test_REMOVE_CHANNEL();
60 schoenebeck 217 void test_GET_AUDIO_OUTPUT_CHANNEL_PARAMETER_INFO();
61 schoenebeck 224 void test_SET_ECHO();
62 schoenebeck 211 void testShutdownLSCPServer();
63     };
64    
65     #endif // __LS_LSCPTEST_H__

  ViewVC Help
Powered by ViewVC