summaryrefslogtreecommitdiff
path: root/tests/test.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test.hpp')
-rw-r--r--tests/test.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test.hpp b/tests/test.hpp
index 166cce5..5bbfbbd 100644
--- a/tests/test.hpp
+++ b/tests/test.hpp
@@ -3,6 +3,7 @@
#include <string.h>
#include <math.h>
+#include <float.h>
#include <sstream>
#include "../src/pugixml.hpp"
@@ -52,7 +53,11 @@ inline bool test_xpath_number_nan(const pugi::xml_node& node, const char* query)
double r = q.evaluate_number(node);
+#ifdef _MSC_VER
+ return _isnan(r) != 0;
+#else
return r != r;
+#endif
}
inline bool test_xpath_fail_compile(const char* query)