]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/controls/textentrytest.cpp
Fix Cygwin 1.7 build.
[wxWidgets.git] / tests / controls / textentrytest.cpp
index 9b5bf74f06f5041fa9ae5619c809cfba1b0b36c2..fcd911cf8ce2476e659fd3ce5be99aa31f53e946 100644 (file)
@@ -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());