]> git.saurik.com Git - wxWidgets.git/blob - tests/controls/itemcontainertest.h
Revert "Show the name of the actually tested class in text entry unit tests."
[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 // RCS-ID: $Id$
7 // Copyright: (c) 2010 Steven Lamerton
8 ///////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_TESTS_CONTROLS_ITEMCONTAINERTEST_H_
11 #define _WX_TESTS_CONTROLS_ITEMCONTAINERTEST_H_
12
13 class ItemContainerTestCase
14 {
15 public:
16 ItemContainerTestCase() { }
17 virtual ~ItemContainerTestCase() { }
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 wxItemContainer interface in setUp() virtual method and
23 // just returning it from here
24 virtual wxItemContainer *GetContainer() const = 0;
25
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;
30
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( SetSelection ); \
43 CPPUNIT_TEST( SetString )
44
45 void Append();
46 void Insert();
47 void Count();
48 void ItemSelection();
49 void FindString();
50 void ClientData();
51 void VoidData();
52 void Set();
53 void SetSelection();
54 void SetString();
55
56 private:
57 wxDECLARE_NO_COPY_CLASS(ItemContainerTestCase);
58 };
59
60 #endif // _WX_TESTS_CONTROLS_ITEMCONTAINERTEST_H_