X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f0f6a32d4d276dd09ecf34cf60d435d2687731f9..e86aa7a62cc8be79ffaeb0d07b70161cb9ea2c74:/tests/controls/textentrytest.h diff --git a/tests/controls/textentrytest.h b/tests/controls/textentrytest.h index db4058c2cb..39be48c97f 100644 --- a/tests/controls/textentrytest.h +++ b/tests/controls/textentrytest.h @@ -10,14 +10,17 @@ #ifndef _WX_TESTS_CONTROLS_TEXTENTRYTEST_H_ #define _WX_TESTS_CONTROLS_TEXTENTRYTEST_H_ +class WXDLLIMPEXP_FWD_CORE wxTextEntry; + // ---------------------------------------------------------------------------- // abstract base class testing wxTextEntry methods // ---------------------------------------------------------------------------- -class TextEntryTestCase : public CppUnit::TestCase +class TextEntryTestCase { public: TextEntryTestCase() { } + virtual ~TextEntryTestCase() { } protected: // this function must be overridden by the derived classes to return the @@ -37,19 +40,38 @@ protected: CPPUNIT_TEST( SetValue ); \ CPPUNIT_TEST( TextChangeEvents ); \ CPPUNIT_TEST( Selection ); \ - CPPUNIT_TEST( InsertionPoint ) + CPPUNIT_TEST( InsertionPoint ); \ + CPPUNIT_TEST( Replace ); \ + WXUISIM_TEST( Editable ); \ + CPPUNIT_TEST( Hint ); \ + CPPUNIT_TEST( CopyPaste ); \ + CPPUNIT_TEST( UndoRedo ) void SetValue(); void TextChangeEvents(); void Selection(); void InsertionPoint(); + void Replace(); + void Editable(); + void Hint(); + void CopyPaste(); + void UndoRedo(); private: // Selection() test helper: verify that selection is as described by the // function parameters void AssertSelection(int from, int to, const char *sel); - DECLARE_NO_COPY_CLASS(TextEntryTestCase) + // helper of AssertSelection(): check that the text selected in the control + // is the given one + // + // this is necessary to disable testing this in wxComboBox test as it + // doesn't provide any way to access the string selection directly, its + // GetStringSelection() method returns the currently selected string in the + // wxChoice part of the control, not the selected text + virtual void CheckStringSelection(const char *sel); + + wxDECLARE_NO_COPY_CLASS(TextEntryTestCase); }; #endif // _WX_TESTS_CONTROLS_TEXTENTRYTEST_H_