mirror of https://github.com/AxioDL/tinyxml2.git
add a printing test
This commit is contained in:
parent
5b0a677712
commit
a6412ac2d5
13
xmltest.cpp
13
xmltest.cpp
|
@ -987,6 +987,19 @@ int main( int /*argc*/, const char ** /*argv*/ )
|
|||
XMLTest( "Tracking unused elements", true, ele != 0, false );
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
const char* xml = "<parent><child>abc</child></parent>";
|
||||
XMLDocument doc;
|
||||
doc.Parse( xml );
|
||||
XMLElement* ele = doc.FirstChildElement( "parent")->FirstChildElement( "child");
|
||||
|
||||
XMLPrinter printer;
|
||||
ele->Accept( &printer );
|
||||
XMLTest( "Printing of sub-element", "<child>abc</child>\n", printer.CStr(), false );
|
||||
}
|
||||
|
||||
|
||||
// ----------- Performance tracking --------------
|
||||
{
|
||||
#if defined( _MSC_VER )
|
||||
|
|
Loading…
Reference in New Issue