From: Yurii R. <yr...@us...> - 2003-01-28 04:16:30
|
Update of /cvsroot/eas-dev/eas-dev/libs/libsxmlstream/tests In directory sc8-pr-cvs1:/tmp/cvs-serv18937/libs/libsxmlstream/tests Added Files: .cvsignore TextStreamTest.h Log Message: a bit updated libsxmlstream, added first test skeleton --- NEW FILE: .cvsignore --- Makefile Makefile.in runTests.cxx --- NEW FILE: TextStreamTest.h --- #ifndef _TEXTSTREAMTEST_H_ #define _TEXTSTREAMTEST_H_ #include <string> #include <cxxtest/TestSuite.h> #include <sxmlstream.hxx> using namespace std; class TextStreamTest: public CxxTest::TestSuite { SXmlTextStream * _stream; public: void setUp() { _stream = new SXmlTextStream(); } void tearDown() { delete _stream; } void test_output() { string _output; // Prepare structures SXml top = SXml_Element_create("test"); SXml top_attr = SXml_Attribute_create("attr","value"); SXml_create_child(top,top_attr); _stream->push(top); _output << (*_stream); cout << "[[" << (*_stream) << "]]" ; cout.flush(); SXml_delete(top); SXml_delete(top_attr); TS_ASSERT_EQUALS(_output, "(test (@ (attr \"value\")))"); } }; #endif /* _TEXTSTREAMTEST_H_ */ |