summaryrefslogtreecommitdiff
path: root/tests/test.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-08-29 15:05:50 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-08-29 15:05:50 +0000
commit9292096c56286a65c0556eac341e1279102f5223 (patch)
tree2b33ef6147ef127436ada144a301bd235a4d79c9 /tests/test.cpp
parent849a5a081b1cd19dd2fa0cb557a0a7503b7d50e7 (diff)
tests: Added support for XPath without exceptions
git-svn-id: http://pugixml.googlecode.com/svn/trunk@637 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test.cpp')
-rw-r--r--tests/test.cpp4
1 files changed, 4 insertions, 0 deletions
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)