From 588bb8de497634632186c0ea3218949194cc3bd8 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Thu, 25 Dec 2014 18:59:18 +0300 Subject: [PATCH] Better tests for empty document --- xmltest.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xmltest.cpp b/xmltest.cpp index 31e1187..764b471 100644 --- a/xmltest.cpp +++ b/xmltest.cpp @@ -863,12 +863,20 @@ int main( int argc, const char ** argv ) { // Empty documents should return TIXML_XML_ERROR_PARSING_EMPTY, bug 1070717 - const char* str = " "; + const char* str = ""; XMLDocument doc; doc.Parse( str ); XMLTest( "Empty document error", XML_ERROR_EMPTY_DOCUMENT, doc.ErrorID() ); } + { + // Documents with all whitespaces should return TIXML_XML_ERROR_PARSING_EMPTY, bug 1070717 + const char* str = " "; + XMLDocument doc; + doc.Parse( str ); + XMLTest( "All whitespaces document error", XML_ERROR_EMPTY_DOCUMENT, doc.ErrorID() ); + } + { // Low entities XMLDocument doc;