+#if wxHAS_TEXT_WINDOW_STREAM && wxUSE_STD_IOSTREAM
+
+ wxStreamToTextRedirector redirect(m_text);
+
+ std::cout << "stringinput"
+ << 10
+ << 1000L
+ << 3.14f
+ << 2.71
+ << 'a';
+
+ CPPUNIT_ASSERT_EQUAL("stringinput1010003.142.71a", m_text->GetValue());
+
+#endif
+}
+
+#if 0
+void TextCtrlTestCase::ProcessEnter()
+{
+#if wxUSE_UIACTIONSIMULATOR
+ wxTestableFrame* frame = wxStaticCast(wxTheApp->GetTopWindow(),
+ wxTestableFrame);
+
+ EventCounter count(m_text, wxEVT_TEXT_ENTER);
+
+ m_text->SetFocus();
+
+ wxUIActionSimulator sim;
+ sim.Char(WXK_RETURN);
+ wxYield();
+
+ CPPUNIT_ASSERT_EQUAL(0, frame->GetEventCount(wxEVT_TEXT_ENTER));
+
+ // we need a text control with wxTE_PROCESS_ENTER for this test
+ delete m_text;
+ CreateText(wxTE_PROCESS_ENTER);
+
+ m_text->SetFocus();
+
+ sim.Char(WXK_RETURN);
+ wxYield();
+
+ CPPUNIT_ASSERT_EQUAL(1, frame->GetEventCount(wxEVT_TEXT_ENTER));
+#endif
+}
+#endif
+
+void TextCtrlTestCase::Url()
+{
+#if wxUSE_UIACTIONSIMULATOR && defined(__WXMSW__)
+ delete m_text;
+ CreateText(wxTE_RICH | wxTE_AUTO_URL);
+
+ EventCounter url(m_text, wxEVT_TEXT_URL);
+
+ m_text->AppendText("http://www.wxwidgets.org");
+
+ wxUIActionSimulator sim;
+ sim.MouseMove(m_text->ClientToScreen(wxPoint(5, 5)));
+ sim.MouseClick();
+ wxYield();
+
+ CPPUNIT_ASSERT_EQUAL(1, url.GetCount());
+#endif
+}
+
+void TextCtrlTestCase::Style()
+{
+#ifndef __WXOSX__
+ delete m_text;
+ // We need wxTE_RICH under windows for style support
+ CreateText(wxTE_RICH);
+
+ // Red text on a white background
+ m_text->SetDefaultStyle(wxTextAttr(*wxRED, *wxWHITE));
+
+ CPPUNIT_ASSERT_EQUAL(m_text->GetDefaultStyle().GetTextColour(), *wxRED);
+ CPPUNIT_ASSERT_EQUAL(m_text->GetDefaultStyle().GetBackgroundColour(),
+ *wxWHITE);
+
+ m_text->AppendText("red on white ");
+
+ // Red text on a grey background
+ m_text->SetDefaultStyle(wxTextAttr(wxNullColour, *wxLIGHT_GREY));
+
+ CPPUNIT_ASSERT_EQUAL(m_text->GetDefaultStyle().GetTextColour(), *wxRED);
+ CPPUNIT_ASSERT_EQUAL(m_text->GetDefaultStyle().GetBackgroundColour(),
+ *wxLIGHT_GREY);
+
+ m_text->AppendText("red on grey ");
+
+ // Blue text on a grey background
+ m_text->SetDefaultStyle(wxTextAttr(*wxBLUE));
+
+
+ CPPUNIT_ASSERT_EQUAL(m_text->GetDefaultStyle().GetTextColour(), *wxBLUE);
+ CPPUNIT_ASSERT_EQUAL(m_text->GetDefaultStyle().GetBackgroundColour(),
+ *wxLIGHT_GREY);
+
+ m_text->AppendText("blue on grey");
+
+ // Get getting the style at a specific location
+ wxTextAttr style;
+
+ // We have to check that styles are supported
+ if(m_text->GetStyle(3, style))