summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-03-21 17:09:42 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-03-21 17:09:42 -0700
commit5959a179679f1a5680a089ddec6d2466432b8541 (patch)
treecdc65e170f08923bbe23cd0ddb22c8b29623808e /tests
parent250b690a546f296fa480cf61ad796a36b66a78c6 (diff)
tests: Final test fix for CW
Diffstat (limited to 'tests')
-rw-r--r--tests/test_dom_modify.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_dom_modify.cpp b/tests/test_dom_modify.cpp
index c06c141..fa50112 100644
--- a/tests/test_dom_modify.cpp
+++ b/tests/test_dom_modify.cpp
@@ -4,6 +4,7 @@
#include <string>
#include <math.h>
+#include <string.h>
#ifdef __BORLANDC__
using std::ldexpf;
@@ -1468,7 +1469,7 @@ template <typename T> bool fp_equal(T lhs, T rhs)
{
// Several compilers compare float/double values on x87 stack without proper rounding
// This causes roundtrip tests to fail, although they correctly preserve the data.
-#if (defined(_MSC_VER) && _MSC_VER < 1400)
+#if (defined(_MSC_VER) && _MSC_VER < 1400) || defined(__MWERKS__)
return memcmp(&lhs, &rhs, sizeof(T)) == 0;
#else
return lhs == rhs;
@@ -1530,7 +1531,7 @@ TEST(dom_fp_roundtrip_double)
{
for (size_t i = 0; i < sizeof(fp_roundtrip_base) / sizeof(fp_roundtrip_base[0]); ++i)
{
- #if defined(_MSC_VER) && _MSC_VER < 1400
+ #if (defined(_MSC_VER) && _MSC_VER < 1400) || defined(__MWERKS__)
// Not all runtime libraries guarantee roundtripping for denormals
if (e == -1021 && fp_roundtrip_base[i] < 0.5)
continue;