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