git-svn-id: file:///srv/svn/repos/haiku/trunk/current@385 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Tyler Dauwalder 2002-07-22 09:31:57 +00:00
parent b706324201
commit e61306cb63
7 changed files with 0 additions and 330 deletions

View File

@ -1,21 +0,0 @@
SubDir OBOS_TOP src tests kits app bhandler ;
CommonUnitTest BHandlerTester
: main.cpp
BHandlerTester.cpp
IsWatchedTest.cpp
LooperTest.cpp
SetNextHandlerTest.cpp
NextHandlerTest.cpp
AddFilterTest.cpp
RemoveFilterTest.cpp
SetFilterListTest.cpp
LockLooperTest.cpp
LockLooperTestCommon.cpp
LockLooperWithTimeoutTest.cpp
UnlockLooperTest.cpp
: kits app
: <boot!home!config!lib>libopenbeos.so be stdc++.r4
: be stdc++.r4
: app support
;

View File

@ -1,80 +0,0 @@
//------------------------------------------------------------------------------
// main.cpp
//
// Entry points for testing BHandler
//------------------------------------------------------------------------------
// Standard Includes -----------------------------------------------------------
// System Includes -------------------------------------------------------------
// Project Includes ------------------------------------------------------------
// Local Includes --------------------------------------------------------------
#include "../common.h"
#include "BHandlerTester.h"
#include "IsWatchedTest.h"
#include "LooperTest.h"
#include "SetNextHandlerTest.h"
#include "NextHandlerTest.h"
#include "AddFilterTest.h"
#include "RemoveFilterTest.h"
#include "SetFilterListTest.h"
#include "LockLooperTest.h"
#include "LockLooperWithTimeoutTest.h"
#include "UnlockLooperTest.h"
// Local Defines ---------------------------------------------------------------
// Globals ---------------------------------------------------------------------
/*
* Function: addonTestFunc()
* Descr: This function is called by the test application to
* get a pointer to the test to run. The BMessageQueue test
* is a test suite. A series of tests are added to
* the suite. Each test appears twice, once for
* the Be implementation of BMessageQueue, once for the
* OpenBeOS implementation.
*/
Test* addonTestFunc(void)
{
TestSuite* tests = new TestSuite("BHandler");
tests->addTest(TBHandlerTester::Suite());
tests->addTest(TIsWatchedTest::Suite());
tests->addTest(TLooperTest::Suite());
tests->addTest(TSetNextHandlerTest::Suite());
tests->addTest(TNextHandlerTest::Suite());
tests->addTest(TAddFilterTest::Suite());
tests->addTest(TRemoveFilterTest::Suite());
tests->addTest(TSetFilterListTest::Suite());
tests->addTest(TLockLooperTest::Suite());
tests->addTest(TLockLooperWithTimeoutTest::Suite());
tests->addTest(TUnlockLooperTest::Suite());
return tests;
}
int main()
{
Test* tests = addonTestFunc();
TextTestResult Result;
tests->run(&Result);
cout << Result << endl;
delete tests;
return !Result.wasSuccessful();
}
/*
* $Log $
*
* $Id $
*
*/

View File

@ -1,15 +0,0 @@
SubDir OBOS_TOP src tests kits app blooper ;
CommonUnitTest BLooperTester
: main.cpp
IsMessageWaitingTest.cpp
RemoveHandlerTest.cpp
IndexOfTest.cpp
CountHandlersTest.cpp
HandlerAtTest.cpp
AddHandlerTest.cpp
: kits app
: <boot!home!config!lib>libopenbeos.so be stdc++.r4
: be stdc++.r4
: app support
;

View File

@ -1,132 +0,0 @@
//------------------------------------------------------------------------------
// main.cpp
//
//------------------------------------------------------------------------------
// Standard Includes -----------------------------------------------------------
#include <stdio.h>
// System Includes -------------------------------------------------------------
#include <be/app/Message.h>
#include <be/app/Messenger.h>
#include <be/app/MessageFilter.h>
#include <Looper.h>
// Project Includes ------------------------------------------------------------
// Local Includes --------------------------------------------------------------
#include "IsMessageWaitingTest.h"
#include "RemoveHandlerTest.h"
#include "IndexOfTest.h"
#include "CountHandlersTest.h"
#include "HandlerAtTest.h"
#include "AddHandlerTest.h"
// Local Defines ---------------------------------------------------------------
// Globals ---------------------------------------------------------------------
/*
* Function: addonTestFunc()
* Descr: This function is called by the test application to
* get a pointer to the test to run. The BMessageQueue test
* is a test suite. A series of tests are added to
* the suite. Each test appears twice, once for
* the Be implementation of BMessageQueue, once for the
* OpenBeOS implementation.
*/
Test* addonTestFunc(void)
{
TestSuite* tests = new TestSuite("BLooper");
tests->addTest(TIsMessageWaitingTest::Suite());
tests->addTest(TRemoveHandlerTest::Suite());
tests->addTest(TIndexOfTest::Suite());
tests->addTest(TCountHandlersTest::Suite());
tests->addTest(THandlerAtTest::Suite());
tests->addTest(TAddHandlerTest::Suite());
return tests;
}
#if 0
class TestLooper : public BLooper
{
public:
TestLooper() : BLooper(), fYouCanQuit(false) {;}
virtual bool QuitRequested()
{
printf("\n%s: %s%s\n", __PRETTY_FUNCTION__, fYouCanQuit ? "" : "not ",
"quitting");
return fYouCanQuit;
}
void SetYouCanQuit(bool yesNo) { fYouCanQuit = yesNo; }
private:
bool fYouCanQuit;
};
filter_result QuitFilter(BMessage* message, BHandler** target,
BMessageFilter* filter)
{
printf("\nAnd here we are\n");
return B_DISPATCH_MESSAGE;
}
#endif
int main()
{
Test* tests = addonTestFunc();
TextTestResult Result;
tests->run(&Result);
cout << Result << endl;
delete tests;
return !Result.wasSuccessful();
#if 0
BLooper* Looper = new TestLooper;
Looper->AddFilter(new BMessageFilter(_QUIT_, QuitFilter));
Looper->Run();
Looper->Lock();
((TestLooper*)Looper)->SetYouCanQuit(true);
Looper->Quit();
snooze(1000000);
//#else
BMessage QuitMsg(B_QUIT_REQUESTED);
printf("\nLooper thread: 0x%lx\n", Looper->Thread());
status_t err;
BMessenger Msgr(NULL, Looper, &err);
if (!err)
{
err = Msgr.SendMessage(&QuitMsg, &QuitMsg);
if (!err)
{
QuitMsg.PrintToStream();
BMessage QuitMsg2(B_QUIT_REQUESTED);
((TestLooper*)Looper)->SetYouCanQuit(true);
err = Msgr.SendMessage(&QuitMsg2, &QuitMsg2);
if (!err)
{
QuitMsg2.PrintToStream();
}
}
}
return 0;
#endif
}
/*
* $Log $
*
* $Id $
*
*/

View File

@ -1,18 +0,0 @@
SubDir OBOS_TOP src tests kits app bmessagequeue ;
UsePublicHeaders app support ;
UnitTest BMessageQueueTester :
AddMessageTest1.cpp
AddMessageTest2.cpp
ConcurrencyTest1.cpp
ConcurrencyTest2.cpp
FindMessageTest1.cpp
MessageQueueTestAddon.cpp
MessageQueueTestCase.cpp
: kits/app ;
LinkSharedOSLibs BMessageQueueTester :
<boot!home!config!lib>libopenbeos.so
be
stdc++.r4 ;

View File

@ -1,10 +0,0 @@
SubDir OBOS_TOP src tests kits app bmessenger ;
CommonUnitTest SMRemoteTargetApp
: SMRemoteTargetApp.cpp
SMLooper.cpp
: kits app
: <boot!home!config!lib>libopenbeos.so be stdc++.r4
: be stdc++.r4
: app support
;

View File

@ -1,54 +0,0 @@
//------------------------------------------------------------------------------
// main.cpp
//
// Entry points for testing BMessenger
//------------------------------------------------------------------------------
// Standard Includes -----------------------------------------------------------
// System Includes -------------------------------------------------------------
// Project Includes ------------------------------------------------------------
// Local Includes --------------------------------------------------------------
#include "../common.h"
#include "BMessengerTester.h"
#include "LockTargetTester.h"
#include "TargetTester.h"
// Local Defines ---------------------------------------------------------------
// Globals ---------------------------------------------------------------------
/*
* Function: addonTestFunc()
* Descr: This function is called by the test application to
* get a pointer to the test to run. The BMessageQueue test
* is a test suite. A series of tests are added to
* the suite.
*/
Test* addonTestFunc(void)
{
TestSuite* tests = new TestSuite("BHandler");
tests->addTest(LockTargetTester::Suite());
tests->addTest(TBMessengerTester::Suite());
tests->addTest(TargetTester::Suite());
return tests;
}
int main()
{
Test* tests = addonTestFunc();
TextTestResult Result;
tests->run(&Result);
cout << Result << endl;
delete tests;
return !Result.wasSuccessful();
}