CPPUNIT_ASSERT_EQUAL( "bye", entry->GetValue() );
}
-void TextEntryTestCase::TextChangeEvents()
+namespace
{
class TextTestEventHandler : public wxEvtHandler
{
private:
int m_events;
- } handler;
+ };
+}
+
+void TextEntryTestCase::TextChangeEvents()
+{
+ TextTestEventHandler handler;
GetTestWindow()->Connect
(
{
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());