From 9292096c56286a65c0556eac341e1279102f5223 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Sun, 29 Aug 2010 15:05:50 +0000 Subject: tests: Added support for XPath without exceptions git-svn-id: http://pugixml.googlecode.com/svn/trunk@637 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/test.cpp') diff --git a/tests/test.cpp b/tests/test.cpp index 29d74c1..ac49872 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -96,6 +96,9 @@ bool test_xpath_number_nan(const pugi::xml_node& node, const pugi::char_t* query bool test_xpath_fail_compile(const pugi::char_t* query) { +#ifdef PUGIXML_NO_EXCEPTIONS + return !pugi::xpath_query(query); +#else try { pugi::xpath_query q(query); @@ -105,6 +108,7 @@ bool test_xpath_fail_compile(const pugi::char_t* query) { return true; } +#endif } void xpath_node_set_tester::check(bool condition) -- cgit v1.2.3