From 47845b699aaec086299071ab0a890d8ba27049da Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Fri, 15 Sep 2017 19:03:02 +0300 Subject: [PATCH] Test ErrorName() returns valid string after SetError() --- xmltest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xmltest.cpp b/xmltest.cpp index 18e2491..b1b64e3 100644 --- a/xmltest.cpp +++ b/xmltest.cpp @@ -1928,7 +1928,9 @@ int main( int argc, const char ** argv ) const XMLError error = static_cast(i); doc.SetError( error, 0, 0, 0 ); XMLTest( "ErrorID() after SetError()", error, doc.ErrorID() ); - doc.ErrorName(); + const char* name = doc.ErrorName(); + XMLTest( "ErrorName() after SetError()", true, name != 0 ); + XMLTest( "ErrorName() after SetError()", true, strlen(name) > 0 ); } }