cppunit-cvs Mailing List for CppUnit - C++ port of JUnit (Page 5)
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...> - 2007-02-24 21:13:12
|
Update of /cvsroot/cppunit/cppunit/include/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv9552/include/cppunit Modified Files: TestAssert.h Log Message: * 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(). Index: TestAssert.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/TestAssert.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** TestAssert.h 6 Nov 2005 16:58:21 -0000 1.29 --- TestAssert.h 24 Feb 2007 21:13:04 -0000 1.30 *************** *** 110,113 **** --- 110,114 ---- * Use CPPUNIT_ASSERT_DOUBLES_EQUAL instead of this function. * \sa Asserter::failNotEqual(). + * \sa CPPUNIT_ASSERT_DOUBLES_EQUAL for detailed semantic of the assertion. */ void CPPUNIT_API assertDoubleEquals( double expected, *************** *** 219,222 **** --- 220,230 ---- /*! \brief Macro for primitive double value comparisons. * \ingroup Assertions + * + * The assertion pass if both expected and actual are finite and + * \c fabs( \c expected - \c actual ) <= \c delta. + * If either \c expected or actual are infinite (+/- inf), the + * assertion pass if \c expected == \c actual. + * If either \c expected or \c actual is a NaN (not a number), then + * the assertion fails. */ #define CPPUNIT_ASSERT_DOUBLES_EQUAL(expected,actual,delta) \ *************** *** 231,234 **** --- 239,243 ---- * user-supplied message in case of failure. * \ingroup Assertions + * \sa CPPUNIT_ASSERT_DOUBLES_EQUAL for detailed semantic of the assertion. */ #define CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(message,expected,actual,delta) \ |
From: Steven R. <sm...@us...> - 2007-01-31 05:27:10
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12080 Modified Files: ChangeLog Log Message: Add tests of the precision generated by assertion_traits<double>::toString(). Index: ChangeLog =================================================================== RCS file: /cvsroot/cppunit/cppunit/ChangeLog,v retrieving revision 1.260 retrieving revision 1.261 diff -C2 -d -r1.260 -r1.261 *** ChangeLog 27 Jan 2007 15:50:09 -0000 1.260 --- ChangeLog 31 Jan 2007 05:27:06 -0000 1.261 *************** *** 1,2 **** --- 1,16 ---- + 2007-01-30 Steve M. Robbins <sm...@su...> + + * examples/cppunittest/assertion_traitsTest.h: + * examples/cppunittest/assertion_traitsTest.cpp: New. Test + assertion_traits<>. + + * examples/cppunittest/Makefile.am: Add + assertion_traitsTest.{h,cpp}. + + * examples/cppunittest/TestAssertTest.h: + * examples/cppunittest/TestAssertTest.cpp: Add + testAssertDoubleEqualsPrecision() to test precision of failure + message. + 2007-01-27 Steve M. Robbins <sm...@su...> |
From: Steven R. <sm...@us...> - 2007-01-31 05:27:10
|
Update of /cvsroot/cppunit/cppunit/examples/cppunittest In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12080/examples/cppunittest Modified Files: Makefile.am TestAssertTest.cpp TestAssertTest.h Added Files: assertion_traitsTest.cpp assertion_traitsTest.h Log Message: Add tests of the precision generated by assertion_traits<double>::toString(). Index: TestAssertTest.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/cppunittest/TestAssertTest.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TestAssertTest.h 27 Jan 2007 15:50:11 -0000 1.7 --- TestAssertTest.h 31 Jan 2007 05:27:07 -0000 1.8 *************** *** 17,20 **** --- 17,21 ---- CPPUNIT_TEST( testAssertMessageFalse ); CPPUNIT_TEST( testAssertDoubleEquals ); + CPPUNIT_TEST( testAssertDoubleEqualsPrecision ); CPPUNIT_TEST( testAssertDoubleNonFinite ); CPPUNIT_TEST( testFail ); *************** *** 44,47 **** --- 45,49 ---- void testAssertDoubleEquals(); + void testAssertDoubleEqualsPrecision(); void testAssertDoubleNonFinite(); --- NEW FILE: assertion_traitsTest.cpp --- #include <cppunit/TestAssert.h> #include "CoreSuite.h" #include "assertion_traitsTest.h" CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( assertion_traitsTest, coreSuiteName() ); assertion_traitsTest::assertion_traitsTest() { } void assertion_traitsTest::test_toString() { CPPUNIT_ASSERT_EQUAL( std::string( "abc" ), CPPUNIT_NS::assertion_traits<char*>::toString( "abc" ) ); CPPUNIT_ASSERT_EQUAL( std::string( "33" ), CPPUNIT_NS::assertion_traits<int>::toString( 33 ) ); // Test that assertion_traits<double>::toString() produces // more than the standard 6 digits of precision. CPPUNIT_ASSERT_EQUAL( std::string( "33.1" ), CPPUNIT_NS::assertion_traits<double>::toString( 33.1 ) ); CPPUNIT_ASSERT_EQUAL( std::string( "33.001" ), CPPUNIT_NS::assertion_traits<double>::toString( 33.001 ) ); CPPUNIT_ASSERT_EQUAL( std::string( "33.00001" ), CPPUNIT_NS::assertion_traits<double>::toString( 33.00001 ) ); CPPUNIT_ASSERT_EQUAL( std::string( "33.0000001" ), CPPUNIT_NS::assertion_traits<double>::toString( 33.0000001 ) ); CPPUNIT_ASSERT_EQUAL( std::string( "33.0000000001" ), CPPUNIT_NS::assertion_traits<double>::toString( 33.0000000001 ) ); } Index: Makefile.am =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/cppunittest/Makefile.am,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Makefile.am 7 May 2003 20:07:16 -0000 1.25 --- Makefile.am 31 Jan 2007 05:27:07 -0000 1.26 *************** *** 7,10 **** --- 7,12 ---- cppunittestmain_SOURCES = \ + assertion_traitsTest.cpp \ + assertion_traitsTest.h \ BaseTestCase.cpp \ BaseTestCase.h \ --- NEW FILE: assertion_traitsTest.h --- #ifndef ASSERTIONTRAITSTEST_H #define ASSERTIONTRAITSTEST_H #include <cppunit/extensions/HelperMacros.h> class assertion_traitsTest : public CPPUNIT_NS::TestFixture { CPPUNIT_TEST_SUITE( assertion_traitsTest ); CPPUNIT_TEST( test_toString ); CPPUNIT_TEST_SUITE_END(); public: assertion_traitsTest(); void test_toString(); private: assertion_traitsTest( const assertion_traitsTest © ); void operator =( const assertion_traitsTest © ); private: }; #endif Index: TestAssertTest.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/cppunittest/TestAssertTest.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TestAssertTest.cpp 27 Jan 2007 15:50:11 -0000 1.12 --- TestAssertTest.cpp 31 Jan 2007 05:27:07 -0000 1.13 *************** *** 136,140 **** } - void TestAssertTest::testAssertMessageTrue() --- 136,139 ---- *************** *** 174,177 **** --- 173,196 ---- } + /* + * Test that the error message from CPPUNIT_ASSERT_DOUBLES_EQUAL() + * has more than the default 6 digits of precision. + */ + void + TestAssertTest::testAssertDoubleEqualsPrecision() + { + std::string failure( "2.000000001" ); + try + { + CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, 2.000000001, 1 ); + } + catch( CPPUNIT_NS::Exception &e ) + { + checkMessageContains( &e, failure ); + return; + } + CPPUNIT_FAIL( "Expected assertion failure" ); + } + void TestAssertTest::testAssertDoubleNonFinite() |
From: Steven R. <sm...@us...> - 2007-01-27 15:50:18
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8653 Modified Files: ChangeLog Log Message: * examples/cppunittest/TestAssertTest.cpp: * examples/cppunittest/TestAssertTest.h: Remove declaration of unimplemented functions testAssertDoubleNotEquals1 and testAssertDoubleNotEquals2. Factor new method testAssertDoubleNonFinite out of existing testAssertDoubleEquals. Index: ChangeLog =================================================================== RCS file: /cvsroot/cppunit/cppunit/ChangeLog,v retrieving revision 1.259 retrieving revision 1.260 diff -C2 -d -r1.259 -r1.260 *** ChangeLog 27 Jan 2007 06:29:17 -0000 1.259 --- ChangeLog 27 Jan 2007 15:50:09 -0000 1.260 *************** *** 1,4 **** --- 1,10 ---- 2007-01-27 Steve M. Robbins <sm...@su...> + * examples/cppunittest/TestAssertTest.cpp: + * examples/cppunittest/TestAssertTest.h: Remove declaration of + unimplemented functions testAssertDoubleNotEquals1 and + testAssertDoubleNotEquals2. Factor new method + testAssertDoubleNonFinite out of existing testAssertDoubleEquals. + * src/cppunit/Win32DynamicLibraryManager.cpp (doLoadLibrary): Unconditionally use ANSI version of LoadLibrary() and other |
From: Steven R. <sm...@us...> - 2007-01-27 15:50:15
|
Update of /cvsroot/cppunit/cppunit/examples/cppunittest In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8653/examples/cppunittest Modified Files: TestAssertTest.cpp TestAssertTest.h Log Message: * examples/cppunittest/TestAssertTest.cpp: * examples/cppunittest/TestAssertTest.h: Remove declaration of unimplemented functions testAssertDoubleNotEquals1 and testAssertDoubleNotEquals2. Factor new method testAssertDoubleNonFinite out of existing testAssertDoubleEquals. Index: TestAssertTest.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/cppunittest/TestAssertTest.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TestAssertTest.h 13 Mar 2004 12:52:57 -0000 1.6 --- TestAssertTest.h 27 Jan 2007 15:50:11 -0000 1.7 *************** *** 17,20 **** --- 17,21 ---- CPPUNIT_TEST( testAssertMessageFalse ); CPPUNIT_TEST( testAssertDoubleEquals ); + CPPUNIT_TEST( testAssertDoubleNonFinite ); CPPUNIT_TEST( testFail ); CPPUNIT_TEST_SUITE_END(); *************** *** 43,48 **** void testAssertDoubleEquals(); ! void testAssertDoubleNotEquals1(); ! void testAssertDoubleNotEquals2(); void testAssertLongEquals(); --- 44,48 ---- void testAssertDoubleEquals(); ! void testAssertDoubleNonFinite(); void testAssertLongEquals(); Index: TestAssertTest.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/cppunittest/TestAssertTest.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** TestAssertTest.cpp 27 Jan 2007 05:46:30 -0000 1.11 --- TestAssertTest.cpp 27 Jan 2007 15:50:11 -0000 1.12 *************** *** 172,176 **** --- 172,180 ---- CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.1, 1.2, 0.09 ) ); CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.2, 1.1, 0.09 ) ); + } + void + TestAssertTest::testAssertDoubleNonFinite() + { double inf = std::numeric_limits<double>::infinity(); CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT_DOUBLES_EQUAL( inf, 0.0, 1.0 ) ); |
From: Steven R. <sm...@us...> - 2007-01-27 06:29:20
|
Update of /cvsroot/cppunit/cppunit/src/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv28896/src/cppunit Modified Files: Win32DynamicLibraryManager.cpp Log Message: Apply patch to fix [ 1293903 ] UNICODE Builds not supported Index: Win32DynamicLibraryManager.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/src/cppunit/Win32DynamicLibraryManager.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Win32DynamicLibraryManager.cpp 19 Nov 2004 20:07:41 -0000 1.6 --- Win32DynamicLibraryManager.cpp 27 Jan 2007 06:29:17 -0000 1.7 *************** *** 20,24 **** DynamicLibraryManager::doLoadLibrary( const std::string &libraryName ) { ! return ::LoadLibrary( libraryName.c_str() ); } --- 20,24 ---- DynamicLibraryManager::doLoadLibrary( const std::string &libraryName ) { ! return ::LoadLibraryA( libraryName.c_str() ); } *************** *** 44,48 **** { LPVOID lpMsgBuf; ! ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | --- 44,48 ---- { LPVOID lpMsgBuf; ! ::FormatMessageA( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | *************** *** 51,63 **** GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language ! (LPTSTR) &lpMsgBuf, 0, NULL ); ! std::string message = (LPCTSTR)lpMsgBuf; // Display the string. ! // ::MessageBox( NULL, (LPCTSTR)lpMsgBuf, "Error", MB_OK | MB_ICONINFORMATION ); // Free the buffer. --- 51,63 ---- GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language ! (LPSTR) &lpMsgBuf, 0, NULL ); ! std::string message = (LPCSTR)lpMsgBuf; // Display the string. ! // ::MessageBoxA( NULL, (LPCSTR)lpMsgBuf, "Error", MB_OK | MB_ICONINFORMATION ); // Free the buffer. |
From: Steven R. <sm...@us...> - 2007-01-27 06:29:20
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv28896 Modified Files: NEWS ChangeLog Log Message: Apply patch to fix [ 1293903 ] UNICODE Builds not supported Index: NEWS =================================================================== RCS file: /cvsroot/cppunit/cppunit/NEWS,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** NEWS 27 Jan 2007 06:02:22 -0000 1.99 --- NEWS 27 Jan 2007 06:29:17 -0000 1.100 *************** *** 10,13 **** --- 10,14 ---- - Fixed some compilation issue for QtTestRunner. + - Code should build on Windows in UNICODE mode. New in CppUnit 1.12.0: Index: ChangeLog =================================================================== RCS file: /cvsroot/cppunit/cppunit/ChangeLog,v retrieving revision 1.258 retrieving revision 1.259 diff -C2 -d -r1.258 -r1.259 *** ChangeLog 27 Jan 2007 05:47:37 -0000 1.258 --- ChangeLog 27 Jan 2007 06:29:17 -0000 1.259 *************** *** 1,2 **** --- 1,8 ---- + 2007-01-27 Steve M. Robbins <sm...@su...> + + * src/cppunit/Win32DynamicLibraryManager.cpp (doLoadLibrary): + Unconditionally use ANSI version of LoadLibrary() and other + functions with string arguments. + 2007-01-26 Steve M. Robbins <sm...@su...> |
From: Steven R. <sm...@us...> - 2007-01-27 06:02:25
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv18882 Modified Files: NEWS Log Message: Note that CPPUNIT_ASSERT_DOUBLES_EQUAL handles non-finite numbers. Index: NEWS =================================================================== RCS file: /cvsroot/cppunit/cppunit/NEWS,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** NEWS 26 Oct 2006 07:21:12 -0000 1.98 --- NEWS 27 Jan 2007 06:02:22 -0000 1.99 *************** *** 2,6 **** ---------------------- ! * Portability: fixed some compilation issue for QtTestRunner. New in CppUnit 1.12.0: --- 2,13 ---- ---------------------- ! * Assertion: ! ! - CPPUNIT_ASSERT_DOUBLES_EQUAL() now properly handles non-finite ! values, specifically NaN, +Inf, and -Inf. ! ! * Portability: ! ! - Fixed some compilation issue for QtTestRunner. New in CppUnit 1.12.0: |
From: Steven R. <sm...@us...> - 2007-01-27 05:47:40
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13628 Modified Files: ChangeLog Log Message: Make sure that CPPUNIT_ASSERT_DOUBLES_EQUAL() properly handles non-finite values. Index: ChangeLog =================================================================== RCS file: /cvsroot/cppunit/cppunit/ChangeLog,v retrieving revision 1.257 retrieving revision 1.258 diff -C2 -d -r1.257 -r1.258 *** ChangeLog 12 Jan 2007 05:56:34 -0000 1.257 --- ChangeLog 27 Jan 2007 05:47:37 -0000 1.258 *************** *** 1,2 **** --- 1,12 ---- + 2007-01-26 Steve M. Robbins <sm...@su...> + + * config/ax_cxx_have_isfinite.m4: New. Autoconf macro that tests + for finite() in C++ mode. + * configure.in: Check for isfinite() and finite(). + + * examples/cppunittest/TestAssertTest.cpp (testAssertDoubleEquals): + * src/cppunit/TestAssert.cpp (assertDoubleEquals): Account for + non-finite values. + 2007-01-11 Steve M. Robbins <sm...@su...> |
From: Steven R. <sm...@us...> - 2007-01-27 05:46:33
|
Update of /cvsroot/cppunit/cppunit/examples/cppunittest In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13223/examples/cppunittest Modified Files: TestAssertTest.cpp Log Message: Add unit tests for CPPUNIT_ASSERT_DOUBLES_EQUAL() that test with non-finite values. Index: TestAssertTest.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/cppunittest/TestAssertTest.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** TestAssertTest.cpp 12 Jan 2007 05:49:43 -0000 1.10 --- TestAssertTest.cpp 27 Jan 2007 05:46:30 -0000 1.11 *************** *** 172,175 **** --- 172,186 ---- CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.1, 1.2, 0.09 ) ); CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.2, 1.1, 0.09 ) ); + + double inf = std::numeric_limits<double>::infinity(); + CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT_DOUBLES_EQUAL( inf, 0.0, 1.0 ) ); + CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0, inf, 1.0 ) ); + CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT_DOUBLES_EQUAL( inf, inf, 1.0 ) ); + + double nan = std::numeric_limits<double>::quiet_NaN(); + CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT_DOUBLES_EQUAL( nan, 0.0, 1.0 ) ); + CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT_DOUBLES_EQUAL( nan, nan, 1.0 ) ); + CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT_DOUBLES_EQUAL( nan, inf, 1.0 ) ); + CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT_DOUBLES_EQUAL( inf, nan, 1.0 ) ); } |
From: Steven R. <sm...@us...> - 2007-01-27 05:45:13
|
Update of /cvsroot/cppunit/cppunit/src/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12622/src/cppunit Modified Files: TestAssert.cpp Log Message: Account for non-finite values in assertDoubleEquals(). Conditional inclusion of cmath rather than math.h removed since (1) it was never used as HAVE_CMATH is never defined, and (2) cmath may move isfinite() into namespace std. Index: TestAssert.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/src/cppunit/TestAssert.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TestAssert.cpp 5 Nov 2004 22:47:20 -0000 1.12 --- TestAssert.cpp 27 Jan 2007 05:45:08 -0000 1.13 *************** *** 1,10 **** ! #if HAVE_CMATH ! # include <cmath> #else ! # include <math.h> #endif ! #include <cppunit/TestAssert.h> ! CPPUNIT_NS_BEGIN --- 1,18 ---- ! #include <cppunit/TestAssert.h> ! ! #include <math.h> ! ! #if !defined(CPPUNIT_HAVE_ISFINITE) ! ! static inline bool isfinite( double x ) ! { ! #if defined(CPPUNIT_HAVE_FINITE) ! return finite( x ); #else ! return ( x * 0.0 ) == 0.0; #endif + } ! #endif CPPUNIT_NS_BEGIN *************** *** 22,26 **** msg.addDetail( AdditionalMessage(message) ); ! Asserter::failNotEqualIf( fabs( expected - actual ) > delta, assertion_traits<double>::toString(expected), assertion_traits<double>::toString(actual), --- 30,40 ---- msg.addDetail( AdditionalMessage(message) ); ! bool equal; ! if ( isfinite(expected) && isfinite(actual) ) ! equal = fabs( expected - actual ) <= delta; ! else ! equal = expected == actual; ! ! Asserter::failNotEqualIf( !equal, assertion_traits<double>::toString(expected), assertion_traits<double>::toString(actual), |
From: Steven R. <sm...@us...> - 2007-01-27 05:33:13
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8547 Modified Files: configure.in Log Message: Check for isfinite() and finite(). Index: configure.in =================================================================== RCS file: /cvsroot/cppunit/cppunit/configure.in,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** configure.in 29 Jun 2006 21:11:30 -0000 1.85 --- configure.in 27 Jan 2007 05:33:10 -0000 1.86 *************** *** 81,86 **** --- 81,92 ---- AX_CXX_GCC_ABI_DEMANGLE AC_CXX_STRING_COMPARE_STRING_FIRST + + + # Check for library functions + # ---------------------------------------------------------------------------- AC_CXX_HAVE_SSTREAM AC_CXX_HAVE_STRSTREAM + AX_CXX_HAVE_ISFINITE + AC_CHECK_FUNCS(finite) cppunit_val='CPPUNIT_HAVE_RTTI' |
From: Steven R. <sm...@us...> - 2007-01-27 05:32:14
|
Update of /cvsroot/cppunit/cppunit/config In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8257/config Added Files: ax_cxx_have_isfinite.m4 Log Message: New autoconf macro to test for isfinite() in C++ mode. --- NEW FILE: ax_cxx_have_isfinite.m4 --- dnl @synopsis AX_CXX_HAVE_ISFINITE dnl dnl If isfinite() is available to the C++ compiler: dnl define HAVE_ISFINITE dnl add "-lm" to LIBS dnl AC_DEFUN([AX_CXX_HAVE_ISFINITE], [ax_cxx_have_isfinite_save_LIBS=$LIBS LIBS="$LIBS -lm" AC_CACHE_CHECK(for isfinite, ax_cv_cxx_have_isfinite, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include <math.h>]], [[int f = isfinite( 3 );]])], [ax_cv_cxx_have_isfinite=yes], [ax_cv_cxx_have_isfinite=no]) AC_LANG_RESTORE]) if test "$ax_cv_cxx_have_isfinite" = yes; then AC_DEFINE([HAVE_ISFINITE],1,[define if compiler has isfinite]) else LIBS=$ax_cxx_have_isfinite_save_LIBS fi ]) |
From: Steven R. <sm...@us...> - 2007-01-24 03:09:58
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv24712 Modified Files: THANKS Log Message: Update email address of Steve M. Robbins Index: THANKS =================================================================== RCS file: /cvsroot/cppunit/cppunit/THANKS,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** THANKS 30 Jul 2005 06:55:21 -0000 1.20 --- THANKS 24 Jan 2007 03:09:52 -0000 1.21 *************** *** 1,5 **** Tim Jansen <ti...@sy...> Christian Leutloff <leu...@de...> ! Steve M. Robbins <ste...@vi...> Patrick Berny <PP...@we...> Patrick Hartling --- 1,5 ---- Tim Jansen <ti...@sy...> Christian Leutloff <leu...@de...> ! Steve M. Robbins <sm...@su...> Patrick Berny <PP...@we...> Patrick Hartling |
From: Steven R. <sm...@us...> - 2007-01-12 05:56:42
|
Update of /cvsroot/cppunit/cppunit/src/DllPlugInTester In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv4426/src/DllPlugInTester Modified Files: CommandLineParser.cpp Log Message: Arrange class initializers in correct order. Index: CommandLineParser.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/src/DllPlugInTester/CommandLineParser.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CommandLineParser.cpp 18 Jun 2004 08:15:29 -0000 1.6 --- CommandLineParser.cpp 12 Jan 2007 05:56:34 -0000 1.7 *************** *** 4,9 **** CommandLineParser::CommandLineParser( int argc, const char *argv[] ) ! : m_currentArgument( 0 ) ! , m_useCompiler( false ) , m_useXml( false ) , m_briefProgress( false ) --- 4,8 ---- CommandLineParser::CommandLineParser( int argc, const char *argv[] ) ! : m_useCompiler( false ) , m_useXml( false ) , m_briefProgress( false ) *************** *** 12,15 **** --- 11,15 ---- , m_useCout( false ) , m_waitBeforeExit( false ) + , m_currentArgument( 0 ) { for ( int index =1; index < argc; ++index ) |
From: Steven R. <sm...@us...> - 2007-01-12 05:56:42
|
Update of /cvsroot/cppunit/cppunit/src/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv4426/src/cppunit Modified Files: DynamicLibraryManagerException.cpp TestCaseDecorator.cpp TextTestRunner.cpp XmlDocument.cpp Log Message: Arrange class initializers in correct order. Index: DynamicLibraryManagerException.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/src/cppunit/DynamicLibraryManagerException.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DynamicLibraryManagerException.cpp 12 Jul 2002 05:59:57 -0000 1.3 --- DynamicLibraryManagerException.cpp 12 Jan 2007 05:56:34 -0000 1.4 *************** *** 10,15 **** const std::string &errorDetail, Cause cause ) ! : m_cause( cause ) ! , std::runtime_error( "" ) { if ( cause == loadingFailed ) --- 10,15 ---- const std::string &errorDetail, Cause cause ) ! : std::runtime_error( "" ), ! m_cause( cause ) { if ( cause == loadingFailed ) Index: TextTestRunner.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/src/cppunit/TextTestRunner.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** TextTestRunner.cpp 29 Jun 2006 18:38:10 -0000 1.20 --- TextTestRunner.cpp 12 Jan 2007 05:56:34 -0000 1.21 *************** *** 19,25 **** */ TextTestRunner::TextTestRunner( Outputter *outputter ) ! : m_outputter( outputter ) ! , m_result( new TestResultCollector() ) , m_eventManager( new TestResult() ) { if ( !m_outputter ) --- 19,25 ---- */ TextTestRunner::TextTestRunner( Outputter *outputter ) ! : m_result( new TestResultCollector() ) , m_eventManager( new TestResult() ) + , m_outputter( outputter ) { if ( !m_outputter ) Index: XmlDocument.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/src/cppunit/XmlDocument.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** XmlDocument.cpp 13 Oct 2005 20:13:16 -0000 1.5 --- XmlDocument.cpp 12 Jan 2007 05:56:34 -0000 1.6 *************** *** 9,14 **** XmlDocument::XmlDocument( const std::string &encoding, const std::string &styleSheet ) ! : m_rootElement( new XmlElement( "DummyRoot" ) ) ! , m_styleSheet( styleSheet ) , m_standalone( true ) { --- 9,14 ---- XmlDocument::XmlDocument( const std::string &encoding, const std::string &styleSheet ) ! : m_styleSheet( styleSheet ) ! , m_rootElement( new XmlElement( "DummyRoot" ) ) , m_standalone( true ) { Index: TestCaseDecorator.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/src/cppunit/TestCaseDecorator.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestCaseDecorator.cpp 3 Aug 2002 15:47:52 -0000 1.1 --- TestCaseDecorator.cpp 12 Jan 2007 05:56:34 -0000 1.2 *************** *** 5,10 **** TestCaseDecorator::TestCaseDecorator( TestCase *test ) ! : m_test( test ) ! , TestCase( test->getName() ) { } --- 5,10 ---- TestCaseDecorator::TestCaseDecorator( TestCase *test ) ! : TestCase( test->getName() ), ! m_test( test ) { } |
From: Steven R. <sm...@us...> - 2007-01-12 05:56:42
|
Update of /cvsroot/cppunit/cppunit/examples/cppunittest In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv4426/examples/cppunittest Modified Files: MockFunctor.h MockProtector.h XmlOutputterTest.cpp XmlUniformiser.cpp Log Message: Arrange class initializers in correct order. Index: MockFunctor.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/cppunittest/MockFunctor.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MockFunctor.h 7 May 2003 21:13:38 -0000 1.2 --- MockFunctor.h 12 Jan 2007 05:56:34 -0000 1.3 *************** *** 12,21 **** public: MockFunctor() ! : m_shouldThrow( false ) , m_shouldThrowFailureException( false ) , m_hasExpectation( false ) , m_actualCallCount( 0 ) , m_expectedCallCount( 0 ) - , m_shouldSucceed( true ) { } --- 12,21 ---- public: MockFunctor() ! : m_shouldSucceed( true ) ! , m_shouldThrow( false ) , m_shouldThrowFailureException( false ) , m_hasExpectation( false ) , m_actualCallCount( 0 ) , m_expectedCallCount( 0 ) { } Index: MockProtector.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/cppunittest/MockProtector.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MockProtector.h 7 May 2003 21:13:38 -0000 1.2 --- MockProtector.h 12 Jan 2007 05:56:34 -0000 1.3 *************** *** 20,27 **** public: MockProtector() ! : m_expectException( false ) ! , m_hasExpectation( false ) ! , m_wasCalled( false ) , m_wasTrapped( false ) , m_shouldPropagateException( false ) { --- 20,27 ---- public: MockProtector() ! : m_wasCalled( false ) , m_wasTrapped( false ) + , m_expectException( false ) + , m_hasExpectation( false ) , m_shouldPropagateException( false ) { Index: XmlUniformiser.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/cppunittest/XmlUniformiser.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** XmlUniformiser.cpp 15 Mar 2003 10:21:44 -0000 1.7 --- XmlUniformiser.cpp 12 Jan 2007 05:56:34 -0000 1.8 *************** *** 42,47 **** XmlUniformiser::XmlUniformiser( const std::string &xml ) : ! m_xml( xml ), ! m_index( 0 ) { } --- 42,47 ---- XmlUniformiser::XmlUniformiser( const std::string &xml ) : ! m_index( 0 ), ! m_xml( xml ) { } Index: XmlOutputterTest.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/cppunittest/XmlOutputterTest.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** XmlOutputterTest.cpp 13 Oct 2005 20:13:15 -0000 1.13 --- XmlOutputterTest.cpp 12 Jan 2007 05:56:34 -0000 1.14 *************** *** 231,239 **** int &successfulTestCalls, int &failedTestCalls ) ! : m_successfulTestCalls( successfulTestCalls ) ! , m_failedTestCalls( failedTestCalls ) ! , m_beginCalls( beginCalls ) , m_endCalls( endCalls ) , m_statisticsCalls( statisticsCalls ) { } --- 231,239 ---- int &successfulTestCalls, int &failedTestCalls ) ! : m_beginCalls( beginCalls ) , m_endCalls( endCalls ) , m_statisticsCalls( statisticsCalls ) + , m_successfulTestCalls( successfulTestCalls ) + , m_failedTestCalls( failedTestCalls ) { } |
From: Steven R. <sm...@us...> - 2007-01-12 05:56:42
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv4426 Modified Files: ChangeLog Log Message: Arrange class initializers in correct order. Index: ChangeLog =================================================================== RCS file: /cvsroot/cppunit/cppunit/ChangeLog,v retrieving revision 1.256 retrieving revision 1.257 diff -C2 -d -r1.256 -r1.257 *** ChangeLog 12 Jan 2007 05:52:49 -0000 1.256 --- ChangeLog 12 Jan 2007 05:56:34 -0000 1.257 *************** *** 1,4 **** --- 1,15 ---- 2007-01-11 Steve M. Robbins <sm...@su...> + * examples/cppunittest/MockFunctor.h: + * examples/cppunittest/MockProtector.h: + * examples/cppunittest/XmlOutputterTest.cpp: + * examples/cppunittest/XmlUniformiser.cpp: + * src/DllPlugInTester/CommandLineParser.cpp: + * src/cppunit/DynamicLibraryManagerException.cpp: + * src/cppunit/TestCaseDecorator.cpp: + * src/cppunit/TextTestRunner.cpp: + * src/cppunit/XmlDocument.cpp: Arrange field initializers in + correct order. + * include/cppunit/plugin/TestPlugIn.h (struct CppUnitTestPlugIn): * include/cppunit/extensions/TestFixtureFactory.h (class TestFixtureFactory): |
From: Steven R. <sm...@us...> - 2007-01-12 05:52:54
|
Update of /cvsroot/cppunit/cppunit/include/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv2716/include/cppunit Modified Files: XmlOutputterHook.h Log Message: Ensure virtual class has virtual destructor. Index: XmlOutputterHook.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/XmlOutputterHook.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** XmlOutputterHook.h 9 Jul 2005 07:42:47 -0000 1.5 --- XmlOutputterHook.h 12 Jan 2007 05:52:49 -0000 1.6 *************** *** 154,157 **** --- 154,159 ---- virtual void statisticsAdded( XmlDocument *document, XmlElement *statisticsElement ); + + virtual ~XmlOutputterHook() {} }; |
From: Steven R. <sm...@us...> - 2007-01-12 05:52:54
|
Update of /cvsroot/cppunit/cppunit/include/cppunit/plugin In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv2716/include/cppunit/plugin Modified Files: TestPlugIn.h Log Message: Ensure virtual class has virtual destructor. Index: TestPlugIn.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/plugin/TestPlugIn.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** TestPlugIn.h 9 Jul 2005 07:42:47 -0000 1.14 --- TestPlugIn.h 12 Jan 2007 05:52:49 -0000 1.15 *************** *** 93,96 **** --- 93,98 ---- */ virtual void uninitialize( CPPUNIT_NS::TestFactoryRegistry *registry ) =0; + + virtual ~CppUnitTestPlugIn() {} }; |
From: Steven R. <sm...@us...> - 2007-01-12 05:52:53
|
Update of /cvsroot/cppunit/cppunit/include/cppunit/extensions In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv2716/include/cppunit/extensions Modified Files: TestFixtureFactory.h Log Message: Ensure virtual class has virtual destructor. Index: TestFixtureFactory.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/extensions/TestFixtureFactory.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestFixtureFactory.h 16 Sep 2002 18:36:52 -0000 1.2 --- TestFixtureFactory.h 12 Jan 2007 05:52:49 -0000 1.3 *************** *** 19,22 **** --- 19,24 ---- //! Creates a new TestFixture instance. virtual TestFixture *makeFixture() =0; + + virtual ~TestFixtureFactory() {} }; |
From: Steven R. <sm...@us...> - 2007-01-12 05:52:53
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv2716 Modified Files: ChangeLog Log Message: Ensure virtual class has virtual destructor. Index: ChangeLog =================================================================== RCS file: /cvsroot/cppunit/cppunit/ChangeLog,v retrieving revision 1.255 retrieving revision 1.256 diff -C2 -d -r1.255 -r1.256 *** ChangeLog 12 Jan 2007 05:49:43 -0000 1.255 --- ChangeLog 12 Jan 2007 05:52:49 -0000 1.256 *************** *** 1,4 **** --- 1,9 ---- 2007-01-11 Steve M. Robbins <sm...@su...> + * include/cppunit/plugin/TestPlugIn.h (struct CppUnitTestPlugIn): + * include/cppunit/extensions/TestFixtureFactory.h (class TestFixtureFactory): + * include/cppunit/XmlOutputterHook.h (XmlOutputterHook): Add + virtual destructor to virtual class. + * examples/cppunittest/TestAssertTest.cpp: Put a C++ statement in the first argument of CPPUNIT_ASSERT_THROW() and |
From: Steven R. <sm...@us...> - 2007-01-12 05:49:46
|
Update of /cvsroot/cppunit/cppunit/examples/cppunittest In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv1384/examples/cppunittest Modified Files: TestAssertTest.cpp Log Message: Put a C++ statement in the first argument of CPPUNIT_ASSERT_THROW() and CPPUNIT_ASSERT_NO_THROW(). Index: TestAssertTest.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/cppunittest/TestAssertTest.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TestAssertTest.cpp 5 Nov 2004 22:47:21 -0000 1.9 --- TestAssertTest.cpp 12 Jan 2007 05:49:43 -0000 1.10 *************** *** 46,50 **** try { ! CPPUNIT_ASSERT_THROW( 1234, std::string ); } catch ( CPPUNIT_NS::Exception & ) --- 46,51 ---- try { ! int x; ! CPPUNIT_ASSERT_THROW( x = 1234, std::string ); } catch ( CPPUNIT_NS::Exception & ) *************** *** 60,64 **** TestAssertTest::testAssertNoThrow() { ! CPPUNIT_ASSERT_NO_THROW( 1234 ); try --- 61,66 ---- TestAssertTest::testAssertNoThrow() { ! int x; ! CPPUNIT_ASSERT_NO_THROW( x = 1234 ); try *************** *** 81,85 **** try { ! CPPUNIT_ASSERT_ASSERTION_FAIL( 1234 ); } catch ( CPPUNIT_NS::Exception & ) --- 83,88 ---- try { ! int x; ! CPPUNIT_ASSERT_ASSERTION_FAIL( x = 1234 ); } catch ( CPPUNIT_NS::Exception & ) *************** *** 95,99 **** TestAssertTest::testAssertAssertionPass() { ! CPPUNIT_ASSERT_ASSERTION_PASS( 1234 ); try --- 98,103 ---- TestAssertTest::testAssertAssertionPass() { ! int x; ! CPPUNIT_ASSERT_ASSERTION_PASS( x = 1234 ); try |
From: Steven R. <sm...@us...> - 2007-01-12 05:49:46
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv1384 Modified Files: ChangeLog Log Message: Put a C++ statement in the first argument of CPPUNIT_ASSERT_THROW() and CPPUNIT_ASSERT_NO_THROW(). Index: ChangeLog =================================================================== RCS file: /cvsroot/cppunit/cppunit/ChangeLog,v retrieving revision 1.254 retrieving revision 1.255 diff -C2 -d -r1.254 -r1.255 *** ChangeLog 12 Jan 2007 05:27:05 -0000 1.254 --- ChangeLog 12 Jan 2007 05:49:43 -0000 1.255 *************** *** 1,4 **** --- 1,8 ---- 2007-01-11 Steve M. Robbins <sm...@su...> + * examples/cppunittest/TestAssertTest.cpp: Put a C++ statement in + the first argument of CPPUNIT_ASSERT_THROW() and + CPPUNIT_ASSERT_NO_THROW(). + * examples/hierarchy/main.cpp (main): Return value now reflects whether tests passed. |
From: Steven R. <sm...@us...> - 2007-01-12 05:27:09
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23758 Modified Files: ChangeLog Log Message: Fix examples/hierarchy to actually return the result of the tests. It is expected to fail, so mark it using XFAIL_TESTS in Makefile.am. Index: ChangeLog =================================================================== RCS file: /cvsroot/cppunit/cppunit/ChangeLog,v retrieving revision 1.253 retrieving revision 1.254 diff -C2 -d -r1.253 -r1.254 *** ChangeLog 12 Jan 2007 04:51:31 -0000 1.253 --- ChangeLog 12 Jan 2007 05:27:05 -0000 1.254 *************** *** 1,4 **** --- 1,9 ---- 2007-01-11 Steve M. Robbins <sm...@su...> + * examples/hierarchy/main.cpp (main): Return value now reflects + whether tests passed. + * examples/hierarchy/Makefile.am (XFAIL_TESTS): New. Mark hierachy + test program as an expected failure. + * Makefile.am (dist-hook): Don't fail if $(distdir)/lib already exists. |