add unit test for wxTextEntry methods of wxComboBox

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-09-19 10:18:30 +00:00
parent 2851cf2582
commit dc7f9c9cee
12 changed files with 129 additions and 1 deletions

View File

@@ -96,6 +96,11 @@ void TextEntryTestCase::TextChangeEvents()
CPPUNIT_ASSERT_EQUAL( 1, handler.GetEvents() );
}
void TextEntryTestCase::CheckStringSelection(const char *sel)
{
CPPUNIT_ASSERT_EQUAL( sel, GetTestEntry()->GetStringSelection() );
}
void TextEntryTestCase::AssertSelection(int from, int to, const char *sel)
{
wxTextEntry * const entry = GetTestEntry();
@@ -107,9 +112,10 @@ void TextEntryTestCase::AssertSelection(int from, int to, const char *sel)
entry->GetSelection(&fromReal, &toReal);
CPPUNIT_ASSERT_EQUAL( from, fromReal );
CPPUNIT_ASSERT_EQUAL( to, toReal );
CPPUNIT_ASSERT_EQUAL( sel, entry->GetStringSelection() );
CPPUNIT_ASSERT_EQUAL( from, entry->GetInsertionPoint() );
CheckStringSelection(sel);
}
void TextEntryTestCase::Selection()