Changed TestApp to BTestApp for sake of consitency with

the rest of the test classes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@407 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Tyler Dauwalder
2002-07-23 22:27:43 +00:00
parent 9d863cc903
commit 242a6db230
5 changed files with 19 additions and 18 deletions
+5 -5
View File
@@ -8,7 +8,7 @@
// TestHandler // TestHandler
class TestHandler : public BHandler { class BTestHandler : public BHandler {
public: public:
virtual void MessageReceived(BMessage *message); virtual void MessageReceived(BMessage *message);
BMessageQueue &Queue(); BMessageQueue &Queue();
@@ -20,23 +20,23 @@ private:
// TestApp // TestApp
class TestApp : public BApplication { class BTestApp : public BApplication {
public: public:
TestApp(const char *signature); BTestApp(const char *signature);
status_t Init(); status_t Init();
void Terminate(); void Terminate();
virtual void ReadyToRun(); virtual void ReadyToRun();
TestHandler &Handler(); BTestHandler &Handler();
private: private:
static int32 _AppThreadStart(void *data); static int32 _AppThreadStart(void *data);
private: private:
thread_id fAppThread; thread_id fAppThread;
TestHandler fHandler; BTestHandler fHandler;
}; };
#endif // _beos_test_app_h_ #endif // _beos_test_app_h_
+1
View File
@@ -1,5 +1,6 @@
SubDir OBOS_TOP src tests kits storage ; SubDir OBOS_TOP src tests kits storage ;
UsePrivateHeaders storage ;
CommonTestLib libstoragetest.so CommonTestLib libstoragetest.so
: StorageKitTestAddon.cpp : StorageKitTestAddon.cpp
+1 -1
View File
@@ -543,7 +543,7 @@ void
QueryTest::setUp() QueryTest::setUp()
{ {
BasicTest::setUp(); BasicTest::setUp();
fApplication = new TestApp("application/x-vnd.obos.query-test"); fApplication = new BTestApp("application/x-vnd.obos.query-test");
if (fApplication->Init() != B_OK) { if (fApplication->Init() != B_OK) {
fprintf(stderr, "Failed to initialize application.\n"); fprintf(stderr, "Failed to initialize application.\n");
delete fApplication; delete fApplication;
+2 -2
View File
@@ -12,7 +12,7 @@
#include "BasicTest.h" #include "BasicTest.h"
class QueryTestEntry; class QueryTestEntry;
class TestApp; class BTestApp;
class QueryTest : public BasicTest class QueryTest : public BasicTest
{ {
@@ -41,7 +41,7 @@ public:
void LiveTest(); void LiveTest();
private: private:
TestApp *fApplication; BTestApp *fApplication;
bool fVolumeCreated; bool fVolumeCreated;
}; };
+10 -10
View File
@@ -6,7 +6,7 @@
// MessageReceived // MessageReceived
void void
TestHandler::MessageReceived(BMessage *message) BTestHandler::MessageReceived(BMessage *message)
{ {
// clone and push it // clone and push it
BMessage *clone = new BMessage(*message); BMessage *clone = new BMessage(*message);
@@ -17,7 +17,7 @@ TestHandler::MessageReceived(BMessage *message)
// Queue // Queue
BMessageQueue & BMessageQueue &
TestHandler::Queue() BTestHandler::Queue()
{ {
return fQueue; return fQueue;
} }
@@ -26,7 +26,7 @@ TestHandler::Queue()
// TestApp // TestApp
// constructor // constructor
TestApp::TestApp(const char *signature) BTestApp::BTestApp(const char *signature)
: BApplication(signature), : BApplication(signature),
fAppThread(B_ERROR), fAppThread(B_ERROR),
fHandler() fHandler()
@@ -37,7 +37,7 @@ TestApp::TestApp(const char *signature)
// Init // Init
status_t status_t
TestApp::Init() BTestApp::Init()
{ {
status_t error = B_OK; status_t error = B_OK;
fAppThread = spawn_thread(&_AppThreadStart, "query app", fAppThread = spawn_thread(&_AppThreadStart, "query app",
@@ -56,7 +56,7 @@ TestApp::Init()
// Terminate // Terminate
void void
TestApp::Terminate() BTestApp::Terminate()
{ {
PostMessage(B_QUIT_REQUESTED, this); PostMessage(B_QUIT_REQUESTED, this);
int32 result; int32 result;
@@ -65,22 +65,22 @@ TestApp::Terminate()
// ReadyToRun // ReadyToRun
void void
TestApp::ReadyToRun() BTestApp::ReadyToRun()
{ {
} }
// Handler // Handler
TestHandler & BTestHandler &
TestApp::Handler() BTestApp::Handler()
{ {
return fHandler; return fHandler;
} }
// _AppThreadStart // _AppThreadStart
int32 int32
TestApp::_AppThreadStart(void *data) BTestApp::_AppThreadStart(void *data)
{ {
if (TestApp *app = (TestApp*)data) { if (BTestApp *app = (BTestApp*)data) {
app->Lock(); app->Lock();
app->Run(); app->Run();
} }