From 82bb074b49f585e55f153a085022713a8788f6a6 Mon Sep 17 00:00:00 2001 From: Lee Thomason Date: Fri, 16 Jun 2017 09:48:20 -0700 Subject: [PATCH] tweak test --- xmltest.cpp | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/xmltest.cpp b/xmltest.cpp index 1febf72..ae0031c 100644 --- a/xmltest.cpp +++ b/xmltest.cpp @@ -1758,17 +1758,17 @@ int main( int argc, const char ** argv ) // Crashing reported via email. const char* xml = "" - "voice" - "1" - "" - "" - "" - "" - "" - "" - "" + "voice" + "1" + "" + "" + "" + "" + "" + "" + "" ""; - + // It's not a good idea to delete elements as you walk the // list. I'm not sure this technically should work; but it's // an interesting test case. @@ -1797,7 +1797,13 @@ int main( int argc, const char ** argv ) playlist->Accept(&printer); printf("%s\n", printer.CStr()); - // No test; it only need to not crash. + // No test; it only need to not crash. + // Still, wrap it up with a sanity check + int nProperty = 0; + for (const XMLElement* p = playlist->FirstChildElement("property"); p; p = p->NextSiblingElement("property")) { + nProperty++; + } + XMLTest("Crash bug parsing", nProperty, 2); } // ----------- Line Number Tracking --------------