add testcase

This commit is contained in:
dinghao188
2022-04-03 06:03:33 +08:00
parent 9efb6b0b66
commit 3e94e4a047

View File

@@ -2147,11 +2147,17 @@ int main( int argc, const char ** argv )
// successful loads should clear the error
XMLDocument doc;
XMLTest( "Should be no error initially", false, doc.Error() );
doc.LoadFile( "resources/no-such-file.xml" );
XMLTest( "No such file - should fail", true, doc.Error() );
doc.LoadFile( "resources/xmltest-5330.xml" );
XMLTest( "parse errors occur - should fail", true, doc.Error() );
doc.LoadFile( "resources/dream.xml" );
XMLTest( "Error should be cleared", false, doc.Error() );
doc.LoadFile( "resources/dream.xml" );
XMLTest( "Error should be cleared", false, doc.Error() );
}
{