1 //------------------------------------------------------------------------------
2 // UnlockLooperTest.cpp
4 //------------------------------------------------------------------------------
6 // Standard Includes -----------------------------------------------------------
8 // System Includes -------------------------------------------------------------
11 // Project Includes ------------------------------------------------------------
13 // Local Includes --------------------------------------------------------------
14 #include "UnlockLooperTest.h"
16 // Local Defines ---------------------------------------------------------------
18 // Globals ---------------------------------------------------------------------
20 //------------------------------------------------------------------------------
23 @case handler has no looper
25 @note Original implementation apparently doesn't check to see if a
26 looper actually exists before trying to call Unlock() on it.
29 void TUnlockLooperTest::UnlockLooper1()
33 Handler
.UnlockLooper();
36 //------------------------------------------------------------------------------
39 @case handler has a looper which is initially unlocked
40 @results debug message "looper must be locked before proceeding" from
43 void TUnlockLooperTest::UnlockLooper2()
49 Looper
.AddHandler(&Handler
);
50 if (Looper
.IsLocked())
52 // Make sure the looper is unlocked
55 Handler
.UnlockLooper();
57 //------------------------------------------------------------------------------
60 @case handler has a looper which is initially locked
63 void TUnlockLooperTest::UnlockLooper3()
67 Looper
.AddHandler(&Handler
);
68 if (!Looper
.IsLocked())
72 Handler
.UnlockLooper();
74 //------------------------------------------------------------------------------
75 Test
* TUnlockLooperTest::Suite()
77 TestSuite
* SuiteOfTests
= new TestSuite("BHandler::UnlockLooper");
79 ADD_TEST4(BHandler
, SuiteOfTests
, TUnlockLooperTest
, UnlockLooper1
);
80 ADD_TEST4(BHandler
, SuiteOfTests
, TUnlockLooperTest
, UnlockLooper2
);
81 ADD_TEST4(BHandler
, SuiteOfTests
, TUnlockLooperTest
, UnlockLooper3
);
85 //------------------------------------------------------------------------------