mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-27 13:33:17 +08:00
5867aff943
Hiding using namespace in common.hpp is somewhat surprising so remove common.hpp and move using namespace into all .cpp files that need it.
24 lines
598 B
C++
24 lines
598 B
C++
#define PUGIXML_DEPRECATED // Suppress deprecated declarations to avoid warnings
|
|
|
|
#include "test.hpp"
|
|
|
|
using namespace pugi;
|
|
|
|
TEST(document_deprecated_load)
|
|
{
|
|
xml_document doc;
|
|
CHECK(doc.load(STR("<node/>")));
|
|
CHECK_NODE(doc, STR("<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_query q(STR("node/foo"));
|
|
xpath_node n2 = doc.select_single_node(q);
|
|
|
|
CHECK(n1.node().attribute(STR("id")).as_int() == 1);
|
|
CHECK(n2.node().attribute(STR("id")).as_int() == 1);
|
|
}
|