diff options
author | Lee Thomason <leethomason@gmail.com> | 2018-01-05 21:32:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-05 21:32:18 +0300 |
commit | 703f91e6b8135298f70dc9b3efe38f713f8dfb22 (patch) | |
tree | 4d5f9cb75f51559a571c70b611a08f9c9ed022de /xmltest.cpp | |
parent | c8593733a21595df00661e2d0812a43249a36916 (diff) | |
parent | 28f9a48d5e89b483007c0bedce42ca133c84e5fc (diff) |
Merge pull request #643 from leethomason/querystring
QueryStringAttribute
Diffstat (limited to 'xmltest.cpp')
-rw-r--r-- | xmltest.cpp | 8 |
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);
}
{
|