From f40377bedc00313caf5af175c9dcb00fe4846ba3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 5 Nov 2010 21:37:54 +0000 Subject: [PATCH] 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 --- tests/controls/textentrytest.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/controls/textentrytest.cpp b/tests/controls/textentrytest.cpp index e28fc4809f..81f9e41bc8 100644 --- a/tests/controls/textentrytest.cpp +++ b/tests/controls/textentrytest.cpp @@ -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() -- 2.45.2