]>
git.saurik.com Git - wxWidgets.git/blob - tests/controls/itemcontainertest.h
86d0801a5d1840899bd006966614989972793e31
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/controls/itemcontainertest.h
3 // Purpose: wxItemContainer unit test
4 // Author: Steven Lamerton
7 // Copyright: (c) 2010 Steven Lamerton
8 ///////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_TESTS_CONTROLS_ITEMCONTAINERTEST_H_
11 #define _WX_TESTS_CONTROLS_ITEMCONTAINERTEST_H_
13 class ItemContainerTestCase
16 ItemContainerTestCase() { }
17 virtual ~ItemContainerTestCase() { }
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 wxItemContainer interface in setUp() virtual method and
23 // just returning it from here
24 virtual wxItemContainer
*GetContainer() const = 0;
26 // and this one must be overridden to return the window which implements
27 // wxItemContainer interface -- usually it will return the same pointer as
28 // GetTestEntry(), just as a different type
29 virtual wxWindow
*GetContainerWindow() const = 0;
31 // this should be inserted in the derived class CPPUNIT_TEST_SUITE
32 // definition to run all wxItemContainer tests as part of it
33 #define wxITEM_CONTAINER_TESTS() \
34 CPPUNIT_TEST( Append ); \
35 CPPUNIT_TEST( Insert ); \
36 CPPUNIT_TEST( Count ); \
37 CPPUNIT_TEST( ItemSelection ); \
38 CPPUNIT_TEST( FindString ); \
39 CPPUNIT_TEST( ClientData ); \
40 CPPUNIT_TEST( VoidData ); \
41 CPPUNIT_TEST( Set ); \
42 CPPUNIT_TEST( SetString )
55 wxDECLARE_NO_COPY_CLASS(ItemContainerTestCase
);
58 #endif // _WX_TESTS_CONTROLS_ITEMCONTAINERTEST_H_