ENH: remote debugging of sunos

This commit is contained in:
Mathieu Malaterre 2009-03-30 04:10:37 -04:00
parent 1bd0b15145
commit 318bfab8c1
1 changed files with 13 additions and 2 deletions

View File

@ -15,12 +15,23 @@
int testIOS(int, char*[]) int testIOS(int, char*[])
{ {
kwsys_ios::ostringstream ostr; kwsys_ios::ostringstream ostr;
ostr << "hello"; const char hello[] = "hello";
if(ostr.str() != "hello") ostr << hello;
if(ostr.str() != hello)
{ {
kwsys_ios::cerr << "failed to write hello to ostr" << kwsys_ios::endl; kwsys_ios::cerr << "failed to write hello to ostr" << kwsys_ios::endl;
return 1; return 1;
} }
const char world[] = "world";
kwsys_ios::ostringstream ostr2;
ostr2.write( hello, strlen(hello) );
ostr2.put( '\0' );
ostr2.write( world, strlen(world) );
if(ostr2.str().size() != strlen(hello) + 1 + strlen(world) )
{
kwsys_ios::cerr << "failed to write hello to ostr2" << kwsys_ios::endl;
return 1;
}
kwsys_ios::istringstream istr(" 10 20 str "); kwsys_ios::istringstream istr(" 10 20 str ");
kwsys_stl::string s; kwsys_stl::string s;
int x; int x;