summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-01-17 18:40:09 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-01-17 18:40:09 -0800
commit3181a305edc9159c71036ff0070f1c3153ec3f1d (patch)
tree4eeffc1a1e67fad3961fafd20b46f422fd8f2ca0
parent617f302808d24fa11fab49b21b71fe644ca7b053 (diff)
tests: Fix MSVC 2008 compilation warning
Also include math.h to fix issues on some compilers.
-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 1fb9dd3..5167358 100644
--- a/tests/test_dom_modify.cpp
+++ b/tests/test_dom_modify.cpp
@@ -2,7 +2,8 @@
#include <limits>
#include <string>
-#include <cmath>
+
+#include <math.h>
TEST_XML(dom_attr_assign, "<node/>")
{
@@ -1483,7 +1484,7 @@ TEST(dom_fp_roundtrip_float)
{
for (size_t i = 0; i < sizeof(fp_roundtrip_base) / sizeof(fp_roundtrip_base[0]); ++i)
{
- float value = ldexpf(fp_roundtrip_base[i], e);
+ float value = ldexpf(static_cast<float>(fp_roundtrip_base[i]), e);
doc.text().set(value);
CHECK(doc.text().as_float() == value);