summaryrefslogtreecommitdiff
path: root/tests/test_xpath_operators.cpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-11-20 23:47:00 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-11-20 23:47:16 -0800
commitdb8df4a5665cfb24c1c18be438d10b2e310a234e (patch)
tree16d251ba91d88fd99343e9628348f912e0170f1a /tests/test_xpath_operators.cpp
parentcca23e636354dc73429a19e14e32cc9a5e632735 (diff)
parent125aa55061ccde4ae7351a9a6c7270a15c9e0204 (diff)
Merge branch 'master' into compact
Diffstat (limited to 'tests/test_xpath_operators.cpp')
-rw-r--r--tests/test_xpath_operators.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_xpath_operators.cpp b/tests/test_xpath_operators.cpp
index 57e3755..450af5d 100644
--- a/tests/test_xpath_operators.cpp
+++ b/tests/test_xpath_operators.cpp
@@ -492,6 +492,7 @@ TEST(xpath_operators_mod)
CHECK_XPATH_NUMBER(c, STR("-5 mod 3"), -2);
CHECK_XPATH_NUMBER(c, STR("-5 mod -3"), -2);
+#if !defined(__BORLANDC__)
// If either operand is NaN, the result is NaN
CHECK_XPATH_NUMBER_NAN(c, STR("(0 div 0) mod 3"));
CHECK_XPATH_NUMBER_NAN(c, STR("3 mod (0 div 0)"));
@@ -505,14 +506,17 @@ TEST(xpath_operators_mod)
CHECK_XPATH_NUMBER_NAN(c, STR("-1 mod 0"));
CHECK_XPATH_NUMBER_NAN(c, STR("(1 div 0) mod 0"));
CHECK_XPATH_NUMBER_NAN(c, STR("(-1 div 0) mod 0"));
+#endif
// If the dividend is finite and the divisor is an infinity, the result equals the dividend
+#if !defined(_MSC_VER) && !defined(__MINGW32__)
CHECK_XPATH_NUMBER(c, STR("1 mod (1 div 0)"), 1);
CHECK_XPATH_NUMBER(c, STR("1 mod (-1 div 0)"), 1);
CHECK_XPATH_NUMBER(c, STR("-1 mod (1 div 0)"), -1);
CHECK_XPATH_NUMBER(c, STR("0 mod (1 div 0)"), 0);
CHECK_XPATH_NUMBER(c, STR("0 mod (-1 div 0)"), 0);
CHECK_XPATH_NUMBER(c, STR("100000 mod (1 div 0)"), 100000);
+#endif
// If the dividend is a zero and the divisor is finite, the result equals the dividend.
CHECK_XPATH_NUMBER(c, STR("0 mod 1000000"), 0);