X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/059979d8481de8fb172b1272c6d10a005ffca3b3..715e4f7e3e26595209b5fe8a9ad3e60cce317e5f:/tests/controls/textentrytest.cpp diff --git a/tests/controls/textentrytest.cpp b/tests/controls/textentrytest.cpp index 9b5bf74f06..fcd911cf8c 100644 --- a/tests/controls/textentrytest.cpp +++ b/tests/controls/textentrytest.cpp @@ -36,7 +36,7 @@ void TextEntryTestCase::SetValue() CPPUNIT_ASSERT_EQUAL( "bye", entry->GetValue() ); } -void TextEntryTestCase::TextChangeEvents() +namespace { class TextTestEventHandler : public wxEvtHandler { @@ -55,7 +55,12 @@ void TextEntryTestCase::TextChangeEvents() private: int m_events; - } handler; + }; +} + +void TextEntryTestCase::TextChangeEvents() +{ + TextTestEventHandler handler; GetTestWindow()->Connect ( @@ -169,13 +174,13 @@ void TextEntryTestCase::Replace() { wxTextEntry * const entry = GetTestEntry(); - entry->SetValue("Hello replace\n" + entry->SetValue("Hello replace!" "0123456789012"); entry->SetInsertionPoint(0); entry->Replace(6, 13, "changed"); - CPPUNIT_ASSERT_EQUAL("Hello changed\n" + CPPUNIT_ASSERT_EQUAL("Hello changed!" "0123456789012", entry->GetValue()); CPPUNIT_ASSERT_EQUAL(13, entry->GetInsertionPoint());