mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-26 12:41:06 +08:00
Add test for xml_node::set_value with size argument
This commit is contained in:
parent
d359402311
commit
1905284494
@ -209,6 +209,24 @@ TEST_XML(dom_node_set_value, "<node>text</node>")
|
||||
CHECK_NODE(doc, STR("<node>no text</node>"));
|
||||
}
|
||||
|
||||
TEST_XML(dom_node_set_value_partially_with_size, "<node>text</node>")
|
||||
{
|
||||
CHECK(doc.child(STR("node")).first_child().set_value(STR("no text"), 2));
|
||||
CHECK(!doc.child(STR("node")).set_value(STR("no text"), 2));
|
||||
CHECK(!xml_node().set_value(STR("no text"), 2));
|
||||
|
||||
CHECK_NODE(doc, STR("<node>no</node>"));
|
||||
}
|
||||
|
||||
TEST_XML(dom_node_set_value_with_size, "<node>text</node>")
|
||||
{
|
||||
CHECK(doc.child(STR("node")).first_child().set_value(STR("no text"), 7));
|
||||
CHECK(!doc.child(STR("node")).set_value(STR("no text"), 7));
|
||||
CHECK(!xml_node().set_value(STR("no text"), 7));
|
||||
|
||||
CHECK_NODE(doc, STR("<node>no text</node>"));
|
||||
}
|
||||
|
||||
TEST_XML(dom_node_set_value_allocated, "<node>text</node>")
|
||||
{
|
||||
CHECK(doc.child(STR("node")).first_child().set_value(STR("no text")));
|
||||
|
Loading…
x
Reference in New Issue
Block a user