]>
git.saurik.com Git - wxWidgets.git/blob - tests/controls/bookctrlbasetest.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/controls/bookctrlbasetest.cpp
3 // Purpose: wxBookCtrlBase unit test
4 // Author: Steven Lamerton
6 // Copyright: (c) 2010 Steven Lamerton
7 ///////////////////////////////////////////////////////////////////////////////
9 #ifndef _WX_TESTS_CONTROLS_BOOKCTRLBASETEST_H_
10 #define _WX_TESTS_CONTROLS_BOOKCTRLBASETEST_H_
12 class BookCtrlBaseTestCase
15 BookCtrlBaseTestCase() { }
16 virtual ~BookCtrlBaseTestCase() { }
19 // this function must be overridden by the derived classes to return the
20 // text entry object we're testing, typically this is done by creating a
21 // control implementing wxBookCtrlBase interface in setUp() virtual method and
22 // just returning it from here
23 virtual wxBookCtrlBase
*GetBase() const = 0;
25 virtual wxEventType
GetChangedEvent() const = 0;
27 virtual wxEventType
GetChangingEvent() const = 0;
29 // this should be inserted in the derived class CPPUNIT_TEST_SUITE
30 // definition to run all wxBookCtrlBase tests as part of it
31 #define wxBOOK_CTRL_BASE_TESTS() \
32 CPPUNIT_TEST( Selection ); \
33 CPPUNIT_TEST( Text ); \
34 CPPUNIT_TEST( PageManagement ); \
35 CPPUNIT_TEST( ChangeEvents )
39 void PageManagement();
42 //You need to add CPPUNIT_TEST( Image ) specifically if you want it to be
43 //tested as only wxNotebook and wxTreebook support images correctly
46 //Call this from the setUp function of a specific test to add panels to
50 // Override this to call Realize() on the toolbar in the wxToolbook test.
51 virtual void Realize() { }
60 wxDECLARE_NO_COPY_CLASS(BookCtrlBaseTestCase
);
63 #endif // _WX_TESTS_CONTROLS_BOOKCTRLBASETEST_H_