-// ----------------------------------------------------------------------------
-// wxTextInput/OutputStream
-// ----------------------------------------------------------------------------
-
-#ifdef TEST_TEXTSTREAM
-
-#include "wx/txtstrm.h"
-#include "wx/wfstream.h"
-
-static void TestTextInputStream()
-{
- wxPuts(wxT("\n*** wxTextInputStream test ***"));
-
- wxString filename = wxT("testdata.fc");
- wxFileInputStream fsIn(filename);
- if ( !fsIn.Ok() )
- {
- wxPuts(wxT("ERROR: couldn't open file."));
- }
- else
- {
- wxTextInputStream tis(fsIn);
-
- size_t line = 1;
- for ( ;; )
- {
- const wxString s = tis.ReadLine();
-
- // line could be non empty if the last line of the file isn't
- // terminated with EOL
- if ( fsIn.Eof() && s.empty() )
- break;
-
- wxPrintf(wxT("Line %d: %s\n"), line++, s.c_str());
- }
- }
-}
-
-#endif // TEST_TEXTSTREAM