Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/leethomason/tinyxml2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Thomason <leethomason@gmail.com>2018-01-05 21:32:18 +0300
committerGitHub <noreply@github.com>2018-01-05 21:32:18 +0300
commit703f91e6b8135298f70dc9b3efe38f713f8dfb22 (patch)
tree4d5f9cb75f51559a571c70b611a08f9c9ed022de /xmltest.cpp
parentc8593733a21595df00661e2d0812a43249a36916 (diff)
parent28f9a48d5e89b483007c0bedce42ca133c84e5fc (diff)
Merge pull request #643 from leethomason/querystring
QueryStringAttribute
Diffstat (limited to 'xmltest.cpp')
-rw-r--r--xmltest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmltest.cpp b/xmltest.cpp
index c8b0181..a647e63 100644
--- a/xmltest.cpp
+++ b/xmltest.cpp
@@ -831,6 +831,14 @@ int main( int argc, const char ** argv )
XMLTest("Attribute: unsigned", (int)XML_SUCCESS, queryResult, true);
XMLTest("Attribute: unsigned", unsigned(100), v, true);
}
+ {
+ const char* v = "failed";
+ int queryResult = element->QueryStringAttribute("not-attrib", &v);
+ XMLTest("Attribute: string default", false, queryResult == XML_SUCCESS);
+ queryResult = element->QueryStringAttribute("attrib", &v);
+ XMLTest("Attribute: string", (int)XML_SUCCESS, queryResult, true);
+ XMLTest("Attribute: string", "100", v);
+ }
XMLTest("Attribute: unsigned", unsigned(100), element->UnsignedAttribute("attrib"), true);
}
{