Minor coverage improvements

git-svn-id: http://pugixml.googlecode.com/svn/trunk@392 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
arseny.kapoulkine 2010-05-08 21:35:42 +00:00
parent 44a8f9ea1d
commit 664638059a
2 changed files with 3 additions and 0 deletions

View file

@ -207,12 +207,14 @@ namespace pugi
return (find == 1 && *dst == 0 && *src == 0);
}
#ifdef PUGIXML_WCHAR_MODE
// Convert string to wide string, assuming all symbols are ASCII
void widen_ascii(wchar_t* dest, const char* source)
{
for (const char* i = source; *i; ++i) *dest++ = *i;
*dest = 0;
}
#endif
}
}

View file

@ -110,6 +110,7 @@ TEST_XML(dom_node_child_value_w, "<node><novalue/><child1>value1</child1><child2
CHECK_STRING(node.child_value_w(STR("c*[23456789]")), STR("value2"));
CHECK_STRING(node.child_value_w(STR("*")), STR("")); // child_value(name) and child_value_w(pattern) do not continue the search if a node w/out value is found first
CHECK_STRING(node.child_value_w(STR("nothing*here")), STR(""));
}
TEST_XML(dom_node_find_child_by_attribute_w, "<node><child1 attr='value1'/><child2 attr='value2'/><child2 attr='value3'/></node>")