]> git.saurik.com Git - wxWidgets.git/blob - tests/controls/itemcontainertest.h
Define __VISUALC__ for ICC under Windows again.
[wxWidgets.git] / tests / controls / itemcontainertest.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/controls/itemcontainertest.h
3 // Purpose: wxItemContainer unit test
4 // Author: Steven Lamerton
5 // Created: 2010-06-29
6 // Copyright: (c) 2010 Steven Lamerton
7 ///////////////////////////////////////////////////////////////////////////////
8
9 #ifndef _WX_TESTS_CONTROLS_ITEMCONTAINERTEST_H_
10 #define _WX_TESTS_CONTROLS_ITEMCONTAINERTEST_H_
11
12 class ItemContainerTestCase
13 {
14 public:
15 ItemContainerTestCase() { }
16 virtual ~ItemContainerTestCase() { }
17
18 protected:
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;
24
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;
29
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 )
43
44 void Append();
45 void Insert();
46 void Count();
47 void ItemSelection();
48 void FindString();
49 void ClientData();
50 void VoidData();
51 void Set();
52 void SetSelection();
53 void SetString();
54
55 private:
56 wxDECLARE_NO_COPY_CLASS(ItemContainerTestCase);
57 };
58
59 #endif // _WX_TESTS_CONTROLS_ITEMCONTAINERTEST_H_