Some more BLooper unit tests, with some minor resulting tweaks to BLooper.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@264 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
ejakowatz
2002-07-17 06:18:27 +00:00
parent 4f139d7754
commit 38f5ceca01
9 changed files with 483 additions and 28 deletions
+4 -4
View File
@@ -271,7 +271,6 @@ bool BLooper::IsMessageWaiting() const
{
if (!IsLocked())
{
// TODO: test
debugger("The Looper must be locked before calling IsMsgWaiting");
return false;
}
@@ -337,8 +336,6 @@ bool BLooper::RemoveHandler(BHandler* handler)
debugger("Looper must be locked before calling RemoveHandler.");
}
// TODO: test
// Need to ensure this algo reflects what actually happens
if (handler->Looper() == this && fHandlers.RemoveItem(handler))
{
if (handler == fPreferred)
@@ -370,7 +367,10 @@ BHandler* BLooper::HandlerAt(int32 index) const
//------------------------------------------------------------------------------
int32 BLooper::IndexOf(BHandler* handler) const
{
AssertLocked();
if (!IsLocked())
{
debugger("Looper must be locked before calling IndexOf.");
}
// TODO: test
// ensure the B_ERROR gets returned if the handler isn't in the list