Ticket #5625: TestPort.cpp

File TestPort.cpp, 582 bytes (added by Pete, 14 years ago)

Test app to create a BMidiPort

Line 
1// Testing MidiPort
2
3#include <stdio.h>
4#include <unistd.h>
5#include <Application.h>
6#include <MidiPort.h>
7#include <Alert.h>
8
9
10class TestApplication : public BApplication
11{
12public:
13 TestApplication() : BApplication("application/x-Test-MidiPort") {
14 }
15 void ReadyToRun(void) {
16 printf("Let's roll...!\n");
17 BMidiPort * port = new BMidiPort();
18 BAlert *myAlert = new BAlert("closer", "Click when done...", "OK");
19 myAlert->Go();
20 delete port;
21 PostMessage(B_QUIT_REQUESTED, this);
22 }
23};
24
25
26
27int main(void)
28{
29 TestApplication myApplication;
30 myApplication.Run();
31 return(0);
32}