0
0
mirror of https://github.com/zeux/pugixml.git synced 2025-01-13 17:37:58 +08:00

tests: Fix PUGIXML_NO_XPATH build

This commit is contained in:
Arseny Kapoulkine 2018-04-03 21:51:41 -07:00
parent 62728d9c2e
commit 5f4afe3bd2

View File

@ -11,6 +11,7 @@ TEST(document_deprecated_load)
CHECK_NODE(doc, STR("<node/>")); CHECK_NODE(doc, STR("<node/>"));
} }
#ifndef PUGIXML_NO_XPATH
TEST_XML(xpath_api_deprecated_select_single_node, "<node><head/><foo id='1'/><foo/><tail/></node>") TEST_XML(xpath_api_deprecated_select_single_node, "<node><head/><foo id='1'/><foo/><tail/></node>")
{ {
xpath_node n1 = doc.select_single_node(STR("node/foo")); xpath_node n1 = doc.select_single_node(STR("node/foo"));
@ -21,3 +22,4 @@ TEST_XML(xpath_api_deprecated_select_single_node, "<node><head/><foo id='1'/><fo
CHECK(n1.node().attribute(STR("id")).as_int() == 1); CHECK(n1.node().attribute(STR("id")).as_int() == 1);
CHECK(n2.node().attribute(STR("id")).as_int() == 1); CHECK(n2.node().attribute(STR("id")).as_int() == 1);
} }
#endif