1 //------------------------------------------------------------------------------ 2 // NextHandlerTest.cpp 3 // 4 //------------------------------------------------------------------------------ 5 6 // Standard Includes ----------------------------------------------------------- 7 8 // System Includes ------------------------------------------------------------- 9 #include <Looper.h> 10 11 // Project Includes ------------------------------------------------------------ 12 13 // Local Includes -------------------------------------------------------------- 14 #include "NextHandlerTest.h" 15 16 // Local Defines --------------------------------------------------------------- 17 18 // Globals --------------------------------------------------------------------- 19 20 //------------------------------------------------------------------------------ 21 /** 22 NextHandler() 23 @case Default constructed BHandler 24 @results Returns NULL 25 */ NextHandler1()26void TNextHandlerTest::NextHandler1() 27 { 28 BHandler Handler; 29 CPPUNIT_ASSERT(Handler.NextHandler() == NULL); 30 } 31 //------------------------------------------------------------------------------ 32 /** 33 NextHandler(); 34 @case Default constructed BHandler added to BLooper 35 @results Returns parent BLooper 36 */ NextHandler2()37void TNextHandlerTest::NextHandler2() 38 { 39 BHandler Handler; 40 BLooper Looper; 41 Looper.AddHandler(&Handler); 42 CPPUNIT_ASSERT(Handler.NextHandler() == &Looper); 43 } 44 //------------------------------------------------------------------------------ Suite()45Test* TNextHandlerTest::Suite() 46 { 47 TestSuite* SuiteOfTests = new TestSuite("BHandler::NextHandler"); 48 49 ADD_TEST4(BHandler, SuiteOfTests, TNextHandlerTest, NextHandler1); 50 ADD_TEST4(BHandler, SuiteOfTests, TNextHandlerTest, NextHandler2); 51 52 return SuiteOfTests; 53 } 54 //------------------------------------------------------------------------------ 55 56 /* 57 * $Log $ 58 * 59 * $Id $ 60 * 61 */ 62 63 64