summaryrefslogtreecommitdiff
path: root/tests/test.hpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-29 13:36:53 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-29 13:36:53 +0000
commit162962a7364a6c39a49f7936adee2a6d0cdb8da5 (patch)
tree90c0020017ccc7b2ab2dacc64fd1c56380166163 /tests/test.hpp
parentd3419f2f4bcac79065a8067d41630bd702046eb8 (diff)
tests: Fixed tests for wchar_t mode, disabled some tests on compilers with broken NaN behavior
git-svn-id: http://pugixml.googlecode.com/svn/trunk@463 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test.hpp')
-rw-r--r--tests/test.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test.hpp b/tests/test.hpp
index 5559baa..e99eb57 100644
--- a/tests/test.hpp
+++ b/tests/test.hpp
@@ -134,6 +134,12 @@ struct dummy_fixture {};
#define U_LITERALS // DMC does not understand \x01234 (it parses first three digits), but understands \u01234
#endif
+#if (defined(_MSC_VER) && _MSC_VER == 1200) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER == 800) || defined(__BORLANDC__)
+// NaN comparison on MSVC6 is incorrect, see http://www.nabble.com/assertDoubleEquals,-NaN---Microsoft-Visual-Studio-6-td9137859.html
+// IC8 and BCC are also affected by the same bug
+# define MSVC6_NAN_BUG
+#endif
+
inline wchar_t wchar_cast(unsigned int value)
{
return static_cast<wchar_t>(value); // to avoid C4310 on MSVC