Enable wxAny<double>::GetAs<unsigned long>() test.
[wxWidgets.git] / tests / controls / bookctrlbasetest.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/controls/bookctrlbasetest.cpp
3 // Purpose: wxBookCtrlBase unit test
4 // Author: Steven Lamerton
5 // Created: 2010-07-02
6 // RCS-ID: $Id$
7 // Copyright: (c) 2010 Steven Lamerton
8 ///////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_TESTS_CONTROLS_BOOKCTRLBASETEST_H_
11 #define _WX_TESTS_CONTROLS_BOOKCTRLBASETEST_H_
12
13 class BookCtrlBaseTestCase
14 {
15 public:
16 BookCtrlBaseTestCase() { }
17 virtual ~BookCtrlBaseTestCase() { }
18
19 protected:
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;
25
26 virtual wxEventType GetChangedEvent() const = 0;
27
28 virtual wxEventType GetChangingEvent() const = 0;
29
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 )
37
38 void Selection();
39 void Text();
40 void PageManagement();
41 void ChangeEvents();
42
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
45 void Image();
46
47 //Call this from the setUp function of a specific test to add panels to
48 //the ctrl.
49 void AddPanels();
50
51 wxPanel* m_panel1;
52 wxPanel* m_panel2;
53 wxPanel* m_panel3;
54
55 wxImageList* m_list;
56
57 private:
58 wxDECLARE_NO_COPY_CLASS(BookCtrlBaseTestCase);
59 };
60
61 #endif // _WX_TESTS_CONTROLS_BOOKCTRLBASETEST_H_