add a printing test

This commit is contained in:
Lee Thomason 2012-12-13 15:39:11 -08:00
parent 5b0a677712
commit a6412ac2d5
1 changed files with 13 additions and 0 deletions

View File

@ -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 )