From 4637965335196754e0dd7398cf11d73a80b9dc33 Mon Sep 17 00:00:00 2001 From: Lee Thomason Date: Thu, 2 Jul 2020 15:23:00 -0700 Subject: [PATCH] add test case --- tinyxml2.h | 2 +- xmltest.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tinyxml2.h b/tinyxml2.h index 7220930..003ef43 100755 --- a/tinyxml2.h +++ b/tinyxml2.h @@ -1458,7 +1458,7 @@ public: XMLError QueryAttribute(const char* name, const char** value) const { return QueryStringAttribute(name, value); - } + } /// Sets the named attribute to value. void SetAttribute( const char* name, const char* value ) { diff --git a/xmltest.cpp b/xmltest.cpp index 77cd6d7..4937dcb 100755 --- a/xmltest.cpp +++ b/xmltest.cpp @@ -632,6 +632,10 @@ int main( int argc, const char ** argv ) ele->SetAttribute( "int", 1 ); ele->SetAttribute( "double", -1.0 ); + const char* answer = 0; + ele->QueryAttribute("str", &answer); + XMLTest("Query char attribute", "strValue", answer); + const char* cStr = ele->Attribute( "str" ); { XMLError queryResult = ele->QueryIntAttribute( "int", &iVal );