]>
git.saurik.com Git - wxWidgets.git/blob - tests/controls/searchctrltest.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/controls/searchctrltest.cpp
3 // Purpose: wxSearchCtrl unit test
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2013 Vadim Zeitlin <vadim@wxwidgets.org>
8 ///////////////////////////////////////////////////////////////////////////////
22 #include "wx/srchctrl.h"
24 class SearchCtrlTestCase
: public CppUnit::TestCase
27 SearchCtrlTestCase() { }
30 virtual void tearDown();
33 CPPUNIT_TEST_SUITE( SearchCtrlTestCase
);
34 CPPUNIT_TEST( Focus
);
35 CPPUNIT_TEST_SUITE_END();
39 wxSearchCtrl
* m_search
;
41 DECLARE_NO_COPY_CLASS(SearchCtrlTestCase
)
44 // register in the unnamed registry so that these tests are run by default
45 CPPUNIT_TEST_SUITE_REGISTRATION( SearchCtrlTestCase
);
47 // also include in its own registry so that these tests can be run alone
48 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( SearchCtrlTestCase
, "SearchCtrlTestCase" );
50 void SearchCtrlTestCase::setUp()
52 m_search
= new wxSearchCtrl(wxTheApp
->GetTopWindow(), wxID_ANY
);
55 void SearchCtrlTestCase::tearDown()
61 void SearchCtrlTestCase::Focus()
64 CPPUNIT_ASSERT( m_search
->HasFocus() );
67 #endif // wxUSE_SEARCHCTRL