From: Yurii R. <yr...@us...> - 2003-01-28 05:04:12
|
Update of /cvsroot/eas-dev/eas-dev/libs/libsxmlstream/tests In directory sc8-pr-cvs1:/tmp/cvs-serv22080/tests Modified Files: TextStreamTest.h Log Message: small bugfixes Index: TextStreamTest.h =================================================================== RCS file: /cvsroot/eas-dev/eas-dev/libs/libsxmlstream/tests/TextStreamTest.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TextStreamTest.h 28 Jan 2003 04:16:26 -0000 1.1 +++ TextStreamTest.h 28 Jan 2003 05:04:08 -0000 1.2 @@ -1,7 +1,10 @@ #ifndef _TEXTSTREAMTEST_H_ #define _TEXTSTREAMTEST_H_ +#include <iostream> +#include <sstream> #include <string> +#include <cstring> #include <cxxtest/TestSuite.h> #include <sxmlstream.hxx> @@ -21,12 +24,11 @@ void tearDown() { - delete _stream; } void test_output() { - string _output; + stringstream _output(""); // Prepare structures SXml top = SXml_Element_create("test"); @@ -36,13 +38,11 @@ _stream->push(top); _output << (*_stream); - cout << "[[" << (*_stream) << "]]" ; - cout.flush(); SXml_delete(top); SXml_delete(top_attr); - TS_ASSERT_EQUALS(_output, "(test (@ (attr \"value\")))"); + TS_ASSERT_EQUALS(_output.str(), "(test (@ (attr \"value\")))"); } }; |