]> git.saurik.com Git - wxWidgets.git/blob - tests/controls/htmllboxtest.cpp
Add wxDEPRECATED_MSG() and use it in a couple of places.
[wxWidgets.git] / tests / controls / htmllboxtest.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/controls/htmllboxtest.cpp
3 // Purpose: wxSimpleHtmlListBoxNameStr unit test
4 // Author: Vadim Zeitlin
5 // Created: 2010-11-27
6 // Copyright: (c) 2010 Vadim Zeitlin <vadim@wxwidgets.org>
7 ///////////////////////////////////////////////////////////////////////////////
8
9 #include "testprec.h"
10
11 #ifdef __BORLANDC__
12 #pragma hdrstop
13 #endif
14
15 #ifndef WX_PRECOMP
16 #include "wx/app.h"
17 #endif // WX_PRECOMP
18
19 #include "wx/htmllbox.h"
20 #include "itemcontainertest.h"
21
22 class HtmlListBoxTestCase : public ItemContainerTestCase,
23 public CppUnit::TestCase
24 {
25 public:
26 HtmlListBoxTestCase() { }
27
28 virtual void setUp();
29 virtual void tearDown();
30
31 private:
32 virtual wxItemContainer *GetContainer() const { return m_htmllbox; }
33 virtual wxWindow *GetContainerWindow() const { return m_htmllbox; }
34
35 CPPUNIT_TEST_SUITE( HtmlListBoxTestCase );
36 wxITEM_CONTAINER_TESTS();
37 CPPUNIT_TEST_SUITE_END();
38
39 wxSimpleHtmlListBox* m_htmllbox;
40
41 DECLARE_NO_COPY_CLASS(HtmlListBoxTestCase)
42 };
43
44 // register in the unnamed registry so that these tests are run by default
45 CPPUNIT_TEST_SUITE_REGISTRATION( HtmlListBoxTestCase );
46
47 // also include in its own registry so that these tests can be run alone
48 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( HtmlListBoxTestCase, "HtmlListBoxTestCase" );
49
50 void HtmlListBoxTestCase::setUp()
51 {
52 m_htmllbox = new wxSimpleHtmlListBox(wxTheApp->GetTopWindow(), wxID_ANY);
53 }
54
55 void HtmlListBoxTestCase::tearDown()
56 {
57 wxDELETE(m_htmllbox);
58 }