Update of /cvsroot/eas-dev/eas-dev/libs/libsxmlstream/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv6701/libs/libsxmlstream/tests
Modified Files:
TextStreamTest.h
Log Message:
Major code refactoring. _SXml struct --> SXmlNode class. Small performance optimization.
*Warning* Code compiled but not tested!
Index: TextStreamTest.h
===================================================================
RCS file: /cvsroot/eas-dev/eas-dev/libs/libsxmlstream/tests/TextStreamTest.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- TextStreamTest.h 28 Jan 2003 05:04:08 -0000 1.2
+++ TextStreamTest.h 28 Jan 2003 22:36:28 -0000 1.3
@@ -31,16 +31,13 @@
stringstream _output("");
// Prepare structures
- SXml top = SXml_Element_create("test");
- SXml top_attr = SXml_Attribute_create("attr","value");
- SXml_create_child(top,top_attr);
+ SXmlNode top = SXmlNode::Element("test");
+ SXmlNode top_attr = SXmlNode::Attribute("attr","value");
+ top.addChild(top_attr);
_stream->push(top);
_output << (*_stream);
-
- SXml_delete(top);
- SXml_delete(top_attr);
TS_ASSERT_EQUALS(_output.str(), "(test (@ (attr \"value\")))");
}
|