From 417048d8cb8eb7cf3f4391aacd915b654f98c18e Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Wed, 19 Nov 2014 16:34:57 -0800 Subject: tests: Fix tests on various compilers Some compilers don't handle NaNs properly. Some compilers don't implement fmod in a IEEE-compatible way. Some compilers have exception handling codegen bugs (DMC...). --- tests/test_xpath_paths.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/test_xpath_paths.cpp') diff --git a/tests/test_xpath_paths.cpp b/tests/test_xpath_paths.cpp index e51a395..69215d8 100644 --- a/tests/test_xpath_paths.cpp +++ b/tests/test_xpath_paths.cpp @@ -460,7 +460,10 @@ TEST_XML(xpath_paths_predicate_number_out_of_range, "< CHECK_XPATH_NODESET(n, STR("following-sibling::chapter[-1 div 0]")); CHECK_XPATH_NODESET(n, STR("following-sibling::chapter[1000000000000]")); CHECK_XPATH_NODESET(n, STR("following-sibling::chapter[1 div 0]")); + +#ifndef MSVC6_NAN_BUG CHECK_XPATH_NODESET(n, STR("following-sibling::chapter[0 div 0]")); +#endif } TEST_XML(xpath_paths_predicate_constant_boolean, "") @@ -480,7 +483,10 @@ TEST_XML(xpath_paths_predicate_position_eq, " CHECK_XPATH_NODESET(doc, STR("node/chapter[position()=1]")) % 3; CHECK_XPATH_NODESET(doc, STR("node/chapter[position()=2+2]")) % 7; CHECK_XPATH_NODESET(doc, STR("node/chapter[position()=last()]")) % 8; + +#ifndef MSVC6_NAN_BUG CHECK_XPATH_NODESET(doc, STR("node/chapter[position()=string()]")) % 5; +#endif } TEST_XML(xpath_paths_predicate_several, "") -- cgit v1.2.3