Re: [Cppunit-devel] CPPUNIT_ASSERT_DOUBLES_EQUAL() with non-finite numbers
Brought to you by:
blep
From: CppUnit d. m. l. <cpp...@li...> - 2006-11-11 17:20:26
|
> Contrary to the claim of Baptiste in the latter patch, isnan() is=20 > standard: it is part of C99. Hopefully we can assume it is portable by= =20 > now. My patch (below) uses isfinite() instead, which is also from C99. Warning, CppUnit supports Microsoft Visual C++, but the function=20 isfinite() is not available on this compiler. However, a similar=20 function called _finite() is provided. I have checked this on Visual C++=20 6, Visual Studio 2003 and Visual Studio 2005. It may be a good idea to put the following macro in the file=20 cppunit/config/config-msvc6.h : #define isfinite(x) _finite(x) Additionnally, it may be good to create a CPPUNIT_HAVE_ISFINITE macro=20 and use it where it is needed. Vincent Rivi=E8re vri...@us... |