cppunit-cvs Mailing List for CppUnit - C++ port of JUnit (Page 35)
Brought to you by:
blep
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(94) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(114) |
Mar
(80) |
Apr
|
May
|
Jun
(36) |
Jul
(67) |
Aug
(37) |
Sep
(33) |
Oct
(28) |
Nov
(91) |
Dec
(16) |
2006 |
Jan
(1) |
Feb
(7) |
Mar
(45) |
Apr
|
May
|
Jun
(36) |
Jul
(7) |
Aug
|
Sep
(32) |
Oct
(3) |
Nov
|
Dec
|
2007 |
Jan
(29) |
Feb
(11) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(35) |
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(14) |
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(13) |
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
(15) |
From: Baptiste L. <bl...@us...> - 2004-11-08 20:14:50
|
Update of /cvsroot/cppunit/cppunit/include/cppunit/portability In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19373/include/cppunit/portability Modified Files: Stream.h Log Message: * added new line at the end of the file. Index: Stream.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/portability/Stream.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Stream.h 2 Sep 2004 19:27:21 -0000 1.3 --- Stream.h 8 Nov 2004 20:14:35 -0000 1.4 *************** *** 342,343 **** --- 342,344 ---- #endif // CPPUNIT_PORTABILITY_STREAM_H_INCLUDED + |
From: Baptiste L. <bl...@us...> - 2004-11-08 20:13:15
|
Update of /cvsroot/cppunit/cppunit/include/cppunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18998/include/cppunit Modified Files: TestAssert.h Log Message: * include/cppunit/TestAssert.h: fixed portability bug pointed out by Neil Ferguson. Index: TestAssert.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/TestAssert.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** TestAssert.h 6 Nov 2004 09:05:45 -0000 1.26 --- TestAssert.h 8 Nov 2004 20:12:58 -0000 1.27 *************** *** 77,81 **** #endif // #ifdef DBL_DIG char buffer[128]; ! sprintf(buffer, "%.*g", DBL_DIG, x); return buffer; } --- 77,81 ---- #endif // #ifdef DBL_DIG char buffer[128]; ! sprintf(buffer, "%.*g", precision, x); return buffer; } |
From: Baptiste L. <bl...@us...> - 2004-11-08 20:13:07
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18998 Modified Files: ChangeLog Log Message: * include/cppunit/TestAssert.h: fixed portability bug pointed out by Neil Ferguson. Index: ChangeLog =================================================================== RCS file: /cvsroot/cppunit/cppunit/ChangeLog,v retrieving revision 1.222 retrieving revision 1.223 diff -C2 -d -r1.222 -r1.223 *** ChangeLog 6 Nov 2004 10:42:00 -0000 1.222 --- ChangeLog 8 Nov 2004 20:12:56 -0000 1.223 *************** *** 1,2 **** --- 1,7 ---- + 2004-11-08 Baptiste Lepilleur <gai...@fr...> + + * include/cppunit/TestAssert.h: fixed portability bug pointed out by + Neil Ferguson. + 2004-11-06 Baptiste Lepilleur <gai...@fr...> *************** *** 7,10 **** --- 12,18 ---- * include/cppunit/Portability.h: fixed EVC++ 4 detection. + * src/cppunit/Win32DynamicLibraryManager.cpp: integrated patch #1024428, + MinGW compilation under Windows XP. + 2004-11-05 Baptiste Lepilleur <gai...@fr...> |
From: Baptiste L. <bl...@us...> - 2004-11-06 11:25:13
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18167 Modified Files: ChangeLog Log Message: * include/cppunit/Portability.h: fixed EVC++ 4 detection. Index: ChangeLog =================================================================== RCS file: /cvsroot/cppunit/cppunit/ChangeLog,v retrieving revision 1.221 retrieving revision 1.222 diff -C2 -d -r1.221 -r1.222 *** ChangeLog 6 Nov 2004 09:05:45 -0000 1.221 --- ChangeLog 6 Nov 2004 10:42:00 -0000 1.222 *************** *** 5,8 **** --- 5,10 ---- to works even if DBL_DIG C99 macro is not defined. + * include/cppunit/Portability.h: fixed EVC++ 4 detection. + 2004-11-05 Baptiste Lepilleur <gai...@fr...> |
From: Baptiste L. <bl...@us...> - 2004-11-06 10:43:59
|
Update of /cvsroot/cppunit/cppunit/include/cppunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18167/include/cppunit Modified Files: Portability.h Log Message: * include/cppunit/Portability.h: fixed EVC++ 4 detection. Index: Portability.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/Portability.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Portability.h 25 Jun 2004 10:41:27 -0000 1.25 --- Portability.h 6 Nov 2004 10:42:01 -0000 1.26 *************** *** 8,16 **** /* include platform specific config */ #if defined(__BORLANDC__) ! # include <cppunit/config/config-bcb5.h> ! #elif defined( EVC4 ) ! # include <cppunit/config/config-evc4.h> #elif defined (_MSC_VER) # include <cppunit/config/config-msvc6.h> #else # include <cppunit/config-auto.h> --- 8,18 ---- /* include platform specific config */ #if defined(__BORLANDC__) ! # include <cppunit/config/config-bcb5.h> #elif defined (_MSC_VER) + # if _MSC_VER == 1200 && defined(_WIN32_WCE) //evc4 + # include <cppunit/config/config-evc4.h> + # else # include <cppunit/config/config-msvc6.h> + # endif #else # include <cppunit/config-auto.h> *************** *** 19,23 **** // Version number of package #ifndef CPPUNIT_VERSION ! #define CPPUNIT_VERSION "1.10.2" #endif --- 21,25 ---- // Version number of package #ifndef CPPUNIT_VERSION ! #define CPPUNIT_VERSION "1.10.4" #endif |
From: Baptiste L. <bl...@us...> - 2004-11-06 09:07:07
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3470 Modified Files: ChangeLog NEWS Log Message: * include/cppunit/TestAssert.h: integrated Neil Ferguson patch for high precision conversion to string for double number. Modified the patch to works even if DBL_DIG C99 macro is not defined. Index: NEWS =================================================================== RCS file: /cvsroot/cppunit/cppunit/NEWS,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** NEWS 5 Nov 2004 22:47:18 -0000 1.83 --- NEWS 6 Nov 2004 09:05:45 -0000 1.84 *************** *** 21,31 **** CPPUNIT_ASSERT_ASSERTION_PASS_MESSAGE - Some assertions failure message are now more detailed (exception, expression). - Thanks to Neil Ferguson who contributed this patch. - Notes: change made to CPPUNIT_ASSERT_THROW may cause compilation error if you're expecting std::exception as it would be caught twice. Contact us if it is an issue (we don't see much use for such a test). * Outputter: --- 21,38 ---- CPPUNIT_ASSERT_ASSERTION_PASS_MESSAGE Notes: change made to CPPUNIT_ASSERT_THROW may cause compilation error if you're expecting std::exception as it would be caught twice. Contact us if it is an issue (we don't see much use for such a test). + Some assertions failure message are now more detailed (exception, + expression). + Thanks to Neil Ferguson who contributed this patch. + + - Assertion on real number now output expected and actual value using the + maximum available precision instead of the previous strategy of rounding + to 6 digits. + + Thanks to Neil Ferguson who contributed this patch. + * Outputter: Index: ChangeLog =================================================================== RCS file: /cvsroot/cppunit/cppunit/ChangeLog,v retrieving revision 1.220 retrieving revision 1.221 diff -C2 -d -r1.220 -r1.221 *** ChangeLog 5 Nov 2004 22:47:18 -0000 1.220 --- ChangeLog 6 Nov 2004 09:05:45 -0000 1.221 *************** *** 1,2 **** --- 1,8 ---- + 2004-11-06 Baptiste Lepilleur <gai...@fr...> + + * include/cppunit/TestAssert.h: integrated Neil Ferguson patch for high + precision conversion to string for double number. Modified the patch + to works even if DBL_DIG C99 macro is not defined. + 2004-11-05 Baptiste Lepilleur <gai...@fr...> |
From: Baptiste L. <bl...@us...> - 2004-11-06 09:07:07
|
Update of /cvsroot/cppunit/cppunit/include/cppunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3470/include/cppunit Modified Files: TestAssert.h Log Message: * include/cppunit/TestAssert.h: integrated Neil Ferguson patch for high precision conversion to string for double number. Modified the patch to works even if DBL_DIG C99 macro is not defined. Index: TestAssert.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/TestAssert.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** TestAssert.h 5 Nov 2004 22:47:20 -0000 1.25 --- TestAssert.h 6 Nov 2004 09:05:45 -0000 1.26 *************** *** 7,10 **** --- 7,12 ---- #include <cppunit/portability/Stream.h> + #include <float.h> // For struct assertion_traits<double> + CPPUNIT_NS_BEGIN *************** *** 51,54 **** --- 53,86 ---- + /*! \brief Traits used by CPPUNIT_ASSERT_DOUBLES_EQUAL(). + * + * This specialisation from @c struct @c assertion_traits<> ensures that + * doubles are converted in full, instead of being rounded to the default + * 6 digits of precision. Use the system defined ISO C99 macro DBL_DIG + * within float.h is available to define the maximum precision, otherwise + * use the hard-coded maximum precision of 15. + */ + template <> + struct assertion_traits<double> + { + static bool equal( double x, double y ) + { + return x == y; + } + + static std::string toString( double x ) + { + #ifdef DBL_DIG + const int precision = DBL_DIG; + #else + const int precision = 15; + #endif // #ifdef DBL_DIG + char buffer[128]; + sprintf(buffer, "%.*g", DBL_DIG, x); + return buffer; + } + }; + + /*! \brief (Implementation) Asserts that two objects of the same type are equals. * Use CPPUNIT_ASSERT_EQUAL instead of this function. |