summaryrefslogtreecommitdiff
path: root/tests/test_xpath_api.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-08-29 15:08:33 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-08-29 15:08:33 +0000
commit608d5bbd79b120602a3a5272fa73ca3d5916aeb1 (patch)
treed747aac40a5c4ee8ba81dd3aaf12d4032cbe972d /tests/test_xpath_api.cpp
parent12607d60470b34a7381d269a8a916f7ff1ff5a61 (diff)
XPath: Added error offset reporting
git-svn-id: http://pugixml.googlecode.com/svn/trunk@639 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_xpath_api.cpp')
-rw-r--r--tests/test_xpath_api.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_xpath_api.cpp b/tests/test_xpath_api.cpp
index 87cc40a..b5b63a7 100644
--- a/tests/test_xpath_api.cpp
+++ b/tests/test_xpath_api.cpp
@@ -4,6 +4,7 @@
#include "helpers.hpp"
+#include <string.h>
#include <string>
TEST_XML(xpath_api_select_nodes, "<node><head/><foo/><foo/><tail/></node>")
@@ -215,7 +216,7 @@ TEST(xpath_api_query_result_fail)
try
{
#endif
- xpath_query q(STR("string-length(1, 2, 3)"));
+ xpath_query q(STR("//foo/child::/bar"));
#ifndef PUGIXML_NO_EXCEPTIONS
CHECK_FORCE_FAIL("Expected exception");
@@ -228,7 +229,7 @@ TEST(xpath_api_query_result_fail)
CHECK(!result);
CHECK(result.error != 0 && result.error[0] != 0);
CHECK(result.description() == result.error);
- CHECK(result.offset == 0); // $$$
+ CHECK(result.offset == 13);
#ifndef PUGIXML_NO_EXCEPTIONS
}