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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 224 - (show annotations) (download) (as text)
Sat Aug 21 15:31:36 2004 UTC (19 years, 8 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 1901 byte(s)
added test against "SET ECHO" LSCP command

1 #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
22 class LSCPTest : public CppUnit::TestFixture {
23
24 CPPUNIT_TEST_SUITE(LSCPTest);
25 CPPUNIT_TEST(printTestSuiteName);
26 CPPUNIT_TEST(testLaunchLSCPServer);
27 CPPUNIT_TEST(testConnectToLSCPServer);
28 CPPUNIT_TEST(test_ADD_CHANNEL);
29 CPPUNIT_TEST(test_GET_CHANNELS);
30 CPPUNIT_TEST(test_REMOVE_CHANNEL);
31 CPPUNIT_TEST(test_GET_AUDIO_OUTPUT_CHANNEL_PARAMETER_INFO);
32 CPPUNIT_TEST(test_SET_ECHO);
33 CPPUNIT_TEST(testShutdownLSCPServer);
34 CPPUNIT_TEST_SUITE_END();
35
36 private:
37 bool launchLSCPServer();
38 bool shutdownLSCPServer();
39
40 bool connectToLSCPServer();
41 bool closeConnectionToLSCPServer();
42
43 void sendCommandToLSCPServer(string cmd);
44 string receiveSingleLineAnswerFromLSCPServer(uint timeout_seconds = 0) throw (LinuxSamplerException);
45 vector<string> receiveMultiLineAnswerFromLSCPServer(uint timeout_seconds = 0) throw (LinuxSamplerException);
46 string receiveAnswerFromLSCPServer(string delimiter, uint timeout_seconds = 0) throw (LinuxSamplerException);
47 void clearInputBuffer();
48 public:
49 void setUp();
50 void tearDown();
51
52 void printTestSuiteName();
53
54 void testLaunchLSCPServer();
55 void testConnectToLSCPServer();
56 void test_ADD_CHANNEL();
57 void test_GET_CHANNELS();
58 void test_REMOVE_CHANNEL();
59 void test_GET_AUDIO_OUTPUT_CHANNEL_PARAMETER_INFO();
60 void test_SET_ECHO();
61 void testShutdownLSCPServer();
62 };
63
64 #endif // __LS_LSCPTEST_H__

  ViewVC Help
Powered by ViewVC