Add another test for the insertion point position after SetValue().

Verify that setting the value of a previously not empty control resets
the insertion point to its beginning.

See #10051.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2010-11-05 21:37:54 +00:00
parent 4a695c4689
commit f40377bedc

View File

@ -144,6 +144,9 @@ void TextEntryTestCase::InsertionPoint()
entry->WriteText("-"); // should move it after the written text
CPPUNIT_ASSERT_EQUAL( 4, entry->GetLastPosition() );
CPPUNIT_ASSERT_EQUAL( 1, entry->GetInsertionPoint() );
entry->SetValue("something different"); // should still reset the caret
CPPUNIT_ASSERT_EQUAL( 0, entry->GetInsertionPoint() );
}
void TextEntryTestCase::Replace()