mirror of https://github.com/AxioDL/tinyxml2.git
Merge pull request #252 from Dmitry-Me/moreAdequateTestForEmpty
Better tests for empty document
This commit is contained in:
commit
6d12b7bc3d
10
xmltest.cpp
10
xmltest.cpp
|
@ -863,12 +863,20 @@ int main( int argc, const char ** argv )
|
||||||
|
|
||||||
{
|
{
|
||||||
// Empty documents should return TIXML_XML_ERROR_PARSING_EMPTY, bug 1070717
|
// Empty documents should return TIXML_XML_ERROR_PARSING_EMPTY, bug 1070717
|
||||||
const char* str = " ";
|
const char* str = "";
|
||||||
XMLDocument doc;
|
XMLDocument doc;
|
||||||
doc.Parse( str );
|
doc.Parse( str );
|
||||||
XMLTest( "Empty document error", XML_ERROR_EMPTY_DOCUMENT, doc.ErrorID() );
|
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
|
// Low entities
|
||||||
XMLDocument doc;
|
XMLDocument doc;
|
||||||
|
|
Loading…
Reference in New Issue