mirror of https://github.com/AxioDL/tinyxml2.git
Test Clear() clears the error
This commit is contained in:
parent
d69e2c0d08
commit
985ea1f78f
10
xmltest.cpp
10
xmltest.cpp
|
@ -1549,6 +1549,16 @@ int main( int argc, const char ** argv )
|
|||
doc.Clear();
|
||||
XMLTest( "Document Clear()'s", true, doc.NoChildren() );
|
||||
}
|
||||
|
||||
{
|
||||
XMLDocument doc;
|
||||
XMLTest( "No error initially", false, doc.Error() );
|
||||
XMLError error = doc.Parse( "This is not XML" );
|
||||
XMLTest( "Error after invalid XML", true, doc.Error() );
|
||||
XMLTest( "Error after invalid XML", error, doc.ErrorID() );
|
||||
doc.Clear();
|
||||
XMLTest( "No error after Clear()", false, doc.Error() );
|
||||
}
|
||||
|
||||
// ----------- Whitespace ------------
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue