X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f0f6a32d4d276dd09ecf34cf60d435d2687731f9..357d2b88cb15fa0ad97b1676fdbc88c2abc85451:/tests/controls/textentrytest.cpp?ds=inline diff --git a/tests/controls/textentrytest.cpp b/tests/controls/textentrytest.cpp index 80e6482fa9..03adf47680 100644 --- a/tests/controls/textentrytest.cpp +++ b/tests/controls/textentrytest.cpp @@ -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()