diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2009-10-28 21:15:05 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2009-10-28 21:15:05 +0000 |
commit | e2ac08d5b40cfa3e4d001be35178ea0e4ef75aad (patch) | |
tree | cb46d900122ed5baddc84348ab0d39aca3d629de /tests/test.hpp | |
parent | 829537013f50c6a16ae4505de262150c376971a9 (diff) |
tests: Fixed NaN tests for MSVC6
git-svn-id: http://pugixml.googlecode.com/svn/trunk@189 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test.hpp')
-rw-r--r-- | tests/test.hpp | 5 |
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)
|