]>
git.saurik.com Git - wxWidgets.git/blob - tests/controls/textctrltest.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/controls/textctrltest.cpp
3 // Purpose: wxTextCtrl unit test
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwidgets.org>
8 ///////////////////////////////////////////////////////////////////////////////
10 // ----------------------------------------------------------------------------
12 // ----------------------------------------------------------------------------
22 #include "wx/textctrl.h"
25 #include "textentrytest.h"
27 // ----------------------------------------------------------------------------
29 // ----------------------------------------------------------------------------
31 class TextCtrlTestCase
: public TextEntryTestCase
34 TextCtrlTestCase() { }
37 virtual void tearDown();
40 virtual wxTextEntry
*GetTestEntry() const { return m_text
; }
41 virtual wxWindow
*GetTestWindow() const { return m_text
; }
43 CPPUNIT_TEST_SUITE( TextCtrlTestCase
);
45 CPPUNIT_TEST_SUITE_END();
49 DECLARE_NO_COPY_CLASS(TextCtrlTestCase
)
52 // register in the unnamed registry so that these tests are run by default
53 CPPUNIT_TEST_SUITE_REGISTRATION( TextCtrlTestCase
);
55 // also include in it's own registry so that these tests can be run alone
56 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( TextCtrlTestCase
, "TextCtrlTestCase" );
58 // ----------------------------------------------------------------------------
59 // test initialization
60 // ----------------------------------------------------------------------------
62 void TextCtrlTestCase::setUp()
64 m_text
= new wxTextCtrl(wxTheApp
->GetTopWindow(), wxID_ANY
);
67 void TextCtrlTestCase::tearDown()
73 // ----------------------------------------------------------------------------
75 // ----------------------------------------------------------------------------