diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2007-02-24 20:13:04 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2007-02-24 20:13:04 +0000 |
| commit | 0d30a2aec28085cfb9fe359c321c289609b884ca (patch) | |
| tree | d5848b1cb981a9fa5ba351b5eb01e4a0e06e1cf8 /include/cppunit/config | |
| parent | 3ca9c5d071cb8162c89fd514a6116ee6b450d763 (diff) | |
| download | cppunit-0d30a2aec28085cfb9fe359c321c289609b884ca.tar.gz | |
Src/cppunit/TestAssert.
src/cppunit/TestAssert.cpp (assertDoubleEquals): Moved finite & NaN
tests to include/cppunit/portability/FloatingPoint.h. Changed
implementation assertDoubleEquals to explicitly test for NaN
in case of non-finite values to force equality failure in the
presence of NaN. Previous implementation failed on Microsoft
Visual Studio 6 (on this platform: NaN == NaN).
* examples/cppunittest/TestAssertTest.cpp: Add more unit tests to
test the portable floating-point primitive. Added missing
include <limits>.
* include/cppunit/portability/Makefile.am:
* include/cppunit/portability/FloatingPoint.h: Added file. Extracted
isfinite() from TestAssert.cpp.
* include/cppunit/config-evc4:
* include/cppunit/config-msvc6: Added support for _finite().
Diffstat (limited to 'include/cppunit/config')
| -rw-r--r-- | include/cppunit/config/config-evc4.h | 5 | ||||
| -rw-r--r-- | include/cppunit/config/config-msvc6.h | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/cppunit/config/config-evc4.h b/include/cppunit/config/config-evc4.h index cb141b0..a791698 100644 --- a/include/cppunit/config/config-evc4.h +++ b/include/cppunit/config/config-evc4.h @@ -60,6 +60,11 @@ # define CPPUNIT_COMPILER_LOCATION_FORMAT "%p(%l):" #endif +/* define to 1 if the compiler has _finite() */ +#ifndef CPPUNIT_HAVE__FINITE +#define CPPUNIT_HAVE__FINITE 1 +#endif + // Uncomment to turn on STL wrapping => use this to test compilation. // This will make CppUnit subclass std::vector & co to provide default // parameter. diff --git a/include/cppunit/config/config-msvc6.h b/include/cppunit/config/config-msvc6.h index a1b0af2..d688171 100644 --- a/include/cppunit/config/config-msvc6.h +++ b/include/cppunit/config/config-msvc6.h @@ -64,6 +64,11 @@ // Define to 1 if the compiler support C++ style cast. #define CPPUNIT_HAVE_CPP_CAST 1 +/* define to 1 if the compiler has _finite() */ +#ifndef CPPUNIT_HAVE__FINITE +#define CPPUNIT_HAVE__FINITE 1 +#endif + // Uncomment to turn on STL wrapping => use this to test compilation. // This will make CppUnit subclass std::vector & co to provide default |
