]>
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
7 // Copyright: (c) 2010 Steven Lamerton
8 ///////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_TESTS_CONTROLS_BOOKCTRLBASETEST_H_
11 #define _WX_TESTS_CONTROLS_BOOKCTRLBASETEST_H_
13 class BookCtrlBaseTestCase
16 BookCtrlBaseTestCase() { }
17 virtual ~BookCtrlBaseTestCase() { }
20 // this function must be overridden by the derived classes to return the
21 // text entry object we're testing, typically this is done by creating a
22 // control implementing wxBookCtrlBase interface in setUp() virtual method and
23 // just returning it from here
24 virtual wxBookCtrlBase
*GetBase() const = 0;
26 virtual wxEventType
GetChangedEvent() const = 0;
28 virtual wxEventType
GetChangingEvent() const = 0;
30 // this should be inserted in the derived class CPPUNIT_TEST_SUITE
31 // definition to run all wxBookCtrlBase tests as part of it
32 #define wxBOOK_CTRL_BASE_TESTS() \
33 CPPUNIT_TEST( Selection ); \
34 CPPUNIT_TEST( Text ); \
35 CPPUNIT_TEST( PageManagement ); \
36 CPPUNIT_TEST( ChangeEvents )
40 void PageManagement();
43 //You need to add CPPUNIT_TEST( Image ) specifically if you want it to be
44 //tested as only wxNotebook and wxTreebook support images correctly
47 //Call this from the setUp function of a specific test to add panels to
51 // Override this to call Realize() on the toolbar in the wxToolbook test.
52 virtual void Realize() { }
61 wxDECLARE_NO_COPY_CLASS(BookCtrlBaseTestCase
);
64 #endif // _WX_TESTS_CONTROLS_BOOKCTRLBASETEST_H_