vfs: check userland buffers before reading them.
[haiku.git] / headers / tools / cppunit / TestApp.h
blob40f95f6e952e3c26dd8d95e9258d0dcfd6234f15
1 // TestApp.h
3 #ifndef _beos_test_app_h_
4 #define _beos_test_app_h_
6 #include <Application.h>
7 #include <List.h>
8 #include <MessageQueue.h>
10 #include <cppunit/Portability.h>
12 // TestHandler
14 class BTestHandler : public BHandler {
15 public:
16 virtual void MessageReceived(BMessage *message);
17 BMessageQueue &Queue();
19 private:
20 BMessageQueue fQueue;
24 // TestApp
26 class CPPUNIT_API BTestApp : public BApplication {
27 public:
28 BTestApp(const char *signature);
29 virtual ~BTestApp();
31 status_t Init();
32 void Terminate();
34 virtual void ReadyToRun();
36 BTestHandler *CreateTestHandler();
37 bool DeleteTestHandler(BTestHandler *handler);
39 BTestHandler &Handler();
40 BTestHandler *TestHandlerAt(int32 index);
42 private:
43 static int32 _AppThreadStart(void *data);
45 private:
46 thread_id fAppThread;
47 BList fHandlers;
50 #endif // _beos_test_app_h_