aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFerenc Géczi <ferenc.gm@gmail.com>2022-09-29 00:00:00 +0000
committerFerenc Géczi <ferenc.gm@gmail.com>2022-09-29 00:00:00 +0000
commit39e169285cf46edda590fbfa495b46e095c5099b (patch)
tree7ae175c77d47cd875fd8cb59a325db7d2e2a0e16
parent1905284494b020c89e120b1caead984859121c48 (diff)
downloadpugixml-39e169285cf46edda590fbfa495b46e095c5099b.zip
pugixml-39e169285cf46edda590fbfa495b46e095c5099b.tar.gz
pugixml-39e169285cf46edda590fbfa495b46e095c5099b.tar.bz2
Add test for xml_attribute::set_value with size argument
-rw-r--r--tests/test_dom_modify.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_dom_modify.cpp b/tests/test_dom_modify.cpp
index 1ce25fe..3451f19 100644
--- a/tests/test_dom_modify.cpp
+++ b/tests/test_dom_modify.cpp
@@ -70,7 +70,13 @@ TEST_XML(dom_attr_set_value, "<node/>")
CHECK(node.append_attribute(STR("attr8")).set_value(true));
CHECK(!xml_attribute().set_value(true));
- CHECK_NODE(node, STR("<node attr1=\"v1\" attr2=\"-2147483647\" attr3=\"-2147483648\" attr4=\"4294967295\" attr5=\"4294967294\" attr6=\"0.5\" attr7=\"0.25\" attr8=\"true\"/>"));
+ CHECK(node.append_attribute(STR("attr9")).set_value(STR("v2"), 2));
+ CHECK(!xml_attribute().set_value(STR("v2")));
+
+ CHECK(node.append_attribute(STR("attr10")).set_value(STR("v3foobar"), 2));
+ CHECK(!xml_attribute().set_value(STR("v3")));
+
+ CHECK_NODE(node, STR("<node attr1=\"v1\" attr2=\"-2147483647\" attr3=\"-2147483648\" attr4=\"4294967295\" attr5=\"4294967294\" attr6=\"0.5\" attr7=\"0.25\" attr8=\"true\" attr9=\"v2\" attr10=\"v3\"/>"));
}
#if LONG_MAX > 2147483647