From e2ac08d5b40cfa3e4d001be35178ea0e4ef75aad Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Wed, 28 Oct 2009 21:15:05 +0000 Subject: tests: Fixed NaN tests for MSVC6 git-svn-id: http://pugixml.googlecode.com/svn/trunk@189 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/test.hpp') 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 #include +#include #include #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) -- cgit v1.2.3