diff options
Diffstat (limited to 'tests/test_xpath_xalan_1.cpp')
-rw-r--r-- | tests/test_xpath_xalan_1.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_xpath_xalan_1.cpp b/tests/test_xpath_xalan_1.cpp index b862b1e..28db218 100644 --- a/tests/test_xpath_xalan_1.cpp +++ b/tests/test_xpath_xalan_1.cpp @@ -361,7 +361,9 @@ TEST_XML(xpath_xalan_math_8, "<k>0.0004</k>") CHECK_XPATH_BOOLEAN(doc, STR("(number(1.75) = (0.109375 * 16))"), true); CHECK_XPATH_NUMBER(doc, STR("number(k)"), 0.0004); CHECK_XPATH_NUMBER(doc, STR("number(4 div 10000)"), 0.0004); - CHECK_XPATH_BOOLEAN(doc, STR("(number(k) = (4 div 10000))"), true); + + // +0 works around extended precision in div on x86 (this is needed for some configurations in MinGW 3.4) + CHECK_XPATH_BOOLEAN(doc, STR("(number(k) = (4 div 10000 + 0))"), true); CHECK_XPATH_NUMBER(doc, STR("number(0.0001 * 4)"), 0.0004); CHECK_XPATH_BOOLEAN(doc, STR("(number(k) = (0.0001 * 4))"), true); } |