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