cppunit-devel Mailing List for CppUnit - C++ port of JUnit (Page 9)
Brought to you by:
blep
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
(21) |
May
(96) |
Jun
(109) |
Jul
(42) |
Aug
(6) |
Sep
(106) |
Oct
(60) |
Nov
(20) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(7) |
Feb
(11) |
Mar
(49) |
Apr
(124) |
May
(30) |
Jun
(37) |
Jul
(53) |
Aug
(33) |
Sep
(21) |
Oct
(22) |
Nov
(19) |
Dec
(15) |
2003 |
Jan
(34) |
Feb
(25) |
Mar
(11) |
Apr
(12) |
May
(16) |
Jun
(24) |
Jul
(23) |
Aug
(23) |
Sep
(42) |
Oct
(7) |
Nov
(32) |
Dec
(33) |
2004 |
Jan
(41) |
Feb
(41) |
Mar
(24) |
Apr
(25) |
May
(18) |
Jun
(13) |
Jul
(11) |
Aug
(15) |
Sep
(22) |
Oct
(10) |
Nov
(15) |
Dec
(9) |
2005 |
Jan
(4) |
Feb
(15) |
Mar
(11) |
Apr
(16) |
May
(29) |
Jun
(17) |
Jul
(27) |
Aug
(12) |
Sep
(9) |
Oct
(10) |
Nov
(5) |
Dec
(6) |
2006 |
Jan
(2) |
Feb
(6) |
Mar
(7) |
Apr
(2) |
May
(1) |
Jun
(5) |
Jul
(8) |
Aug
(6) |
Sep
(10) |
Oct
(11) |
Nov
(15) |
Dec
(2) |
2007 |
Jan
(12) |
Feb
(22) |
Mar
(10) |
Apr
(7) |
May
(1) |
Jun
(8) |
Jul
(4) |
Aug
(1) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
2008 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <vi...@re...> - 2005-08-02 12:42:52
|
Hello, I would like to make a comment about doc that describes PlugInManager::load() method. It says: ------- Exceptions: DynamicLibraryManager is thrown if an error occurs during loading. ------- Maybe you meant DynamicLibraryManagerException, not DynamicLibraryManager? Thanks, Victor |
From: Baptiste L. <bl...@us...> - 2005-08-01 07:21:06
|
Please report any compilation issues (specifically regression from 1.10.2= ),=20 as this will be the future stable release 1.12.0. New in CppUnit 1.11.0: * Portability: - Support for Embedded Visual C++ 4 added. For this purpose, CppUnit no= w provides a very simple stream implementation if none is provided. This should also help porting on other platforms which have STL but no stream support. Just make sure that CPPUNIT_NO_STREAM is defined to 1 in your config header. * Assertion: - Added missing _MESSAGE variants for the following assertions: CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE CPPUNIT_ASSERT_THROW_MESSAGE CPPUNIT_ASSERT_NO_THROW_MESSAGE CPPUNIT_ASSERT_ASSERTION_FAIL_MESSAGE CPPUNIT_ASSERT_ASSERTION_PASS_MESSAGE Notes: change made to CPPUNIT_ASSERT_THROW may cause compilation erro= r if you're expecting std::exception as it would be caught twice. Conta= ct 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 t= he maximum available precision instead of the previous strategy of round= ing to 6 digits. Thanks to Neil Ferguson who contributed this patch. * Outputter: - XML Ouputter: patch #997006 contributed by Akos Maroy makes the 'stand-alone' attribute of the XML header optional. See XmlOutputter::setStandalone() & XmlDocument::setStandalone(). - Better integration of compiler output for gcc on Mac OS X with Xcode (contributed by Claus Broch). * MFC Test Runner - Integration with VC++ 7.0 & 7.1. Double clicking on a failure will no= w to the failure location in the open IDE (no add-in necessary). This was contributed by Max Quatember and Andreas Pfaffenbichler. - Progress bar: now use system color to draw border (patch from bug #1165875 contributed by Pieter Van Dyck). * QT Test Runner - Fixed display of multi-line messages (patch contributed by Karol Szkudlarek). * Compilation: - MinGW: patch #1024428 contributed by astar, fixed compilation issue i= n Win32DynamicLibraryManager.cpp. - MinGW, cygwin: enable build of shared library when using libtool. patch #1194394 contributed by St=E9phane Fillod. - autotool: applied patch #1076398 contributed by Henner Sudek. Quote: "This patch allows AM_PATH_CPPUNIT to accept version numbers without minor and micro version. Now you can do: AM_PATH_CPPUNIT(1.9) instead of AM_PATH_CPPUNIT(1.9.0)" * Documentation: - Corrected many typos in cookbook and money example. Thanks to all those who helped ! * Bug Fix: - cppunit.m4: patch #946302, AM_PATH_CPPUNIT doesn't report result if CppUnit is missing. - Message/SourceLine: copy constructor have been specifically implement= ed to ensure they are thread-safe even if std::string copy constructor is not (usually on reference count based implementation). - TestResultCollector: fixed memory leak occuring when calling reset(). * Contrib: - added XSLT for compatibility with Ant junit xml formatter. Patch #1112053 contributed by Norbert Barbosa. See xml-xsl/cppunit2junit.xsl and cppunit2junit.txt for details. * (Possible) Compatiblity break: - All text output is now done on cout() instead of sometime cerr & sometime cout depending on the component. - OStringStream definition has been removed from Portability.h. This means that <sstream> is no longer included, and that ostringstream an= d string might not be defined. In practice this should have no impact since those includes have been moved to other CppUnit headers. * Notes: - CppUnit now uses the alias OStream when refering to std::ostream for portability. Baptiste. --- Baptiste Lepilleur <bl...@us...> CppUnit maintainer OpenTest and CppUnit 2 developer. |
From: Baptiste L. <bl...@us...> - 2005-07-30 07:25:04
|
Thomas Drillich wrote: > Hello, > > can anybody help me, to find the reason why CPPUNIT_FAIL > cause a SIGSEGV. > thx in advance. From experience such failure are caused by wrong or inconsistent compilation option. The CPPUNIT_FAIL throw an exception. I'd would recommend inlining the macro code and stepping into CPPUNIT_FAIL code with a debugger to see what is happening. Baptiste. > ---------------------------------------------------------------------------------------- > ostringstream ostr; > .... > > } catch (const Exception &e ) { > // if( e.Errno() != EINVAL ) { > ostr.str(""); > ostr << mesg.shortDescription() > << "\n-- Unexpected Dns::Exception received !! \n--" > << e.message() << "--\n"; > cout << endl << ostr.str() << endl << endl; // here's nice output > CPPUNIT_FAIL( ostr.str() ); // got sigsegv > // } > } > --------------------------------------------------------------------------------------- --- Baptiste Lepilleur <bl...@us...> CppUnit maintainer OpenTest and CppUnit 2 developer. |
From: Baptiste L. <bl...@us...> - 2005-07-30 07:14:17
|
Vincent Rivi=E8re wrote: > In file include\cppunit\config\config-msvc6.h > the following line should be added : > > #define CPPUNIT_HAVE_CPP_CAST 1 > > This is because Visual C++ 6.0 really supports C++-style casts. > I've tested with Visual C++ 6.0 SP6. Well caught. Baptiste. > > Vincent. --- Baptiste Lepilleur <bl...@us...> CppUnit maintainer OpenTest and CppUnit 2 developer.=20 |
From: Baptiste L. <bl...@us...> - 2005-07-30 06:57:59
|
vi...@re... wrote: > Hello, > > I would like to make a comment about doc on > http://cppunit.sourceforge.net/doc/lastest/group___writing_test_plug_in.html >> > > > "You can define your one implementation" > > Maube you meant "You can define your OWN implementation" ? Thanks for the correction. Baptiste. > > Thanks, > Victor --- Baptiste Lepilleur <bl...@us...> CppUnit maintainer OpenTest and CppUnit 2 developer. |
From: Baptiste L. <bl...@us...> - 2005-07-30 06:56:03
|
Vincent Rivi=E8re wrote: > With Visual C++ 6.0, there is a means to automatically configure > CppUnit usage of RTTI. > When the check box "Project Settings > C/C++ > C++ Language > Enable > Run-Time Type Information (RTTI)" is checked, the compiler defines > the symbol _CPPRTTI. > > CppUnit can easily take advantage of this feature to automatically > define CPPUNIT_HAVE_RTTI without user configuration. > > In file include\cppunit\config\config-msvc6.h > > Replace : > > /* define if the compiler supports Run-Time Type Identification */ > #ifndef CPPUNIT_HAVE_RTTI > #define CPPUNIT_HAVE_RTTI 1 > #endif > > By : > > /* define if the compiler supports Run-Time Type Identification */ > #ifndef CPPUNIT_HAVE_RTTI > # ifdef _CPPRTTI // Defined by the compiler option /GR > # define CPPUNIT_HAVE_RTTI 1 > # else > # define CPPUNIT_HAVE_RTTI 0 > # endif > #endif Just committed, Thanks Vincent ! > > Vincent. --- Baptiste Lepilleur <bl...@us...> CppUnit maintainer OpenTest and CppUnit 2 developer.=20 |
From: Baptiste L. <bl...@us...> - 2005-07-30 06:51:27
|
Vincent Rivi=E8re wrote: > There is a memory leak in src\cppunit\TestResultCollector.cpp > It happens when a TestSuite is run and there are failures. > > In the destructor of TestResultCollector, > a call to freeFailures() is missing. Thanks for reporting this. It's fixed now. Baptiste. > > Vincent. --- Baptiste Lepilleur <bl...@us...> CppUnit maintainer OpenTest and CppUnit 2 developer.=20 |
From: <vri...@us...> - 2005-07-28 12:35:41
|
There is a memory leak in src\cppunit\TestResultCollector.cpp It happens when a TestSuite is run and there are failures. In the destructor of TestResultCollector, a call to freeFailures() is missing. Vincent. |
From: <vri...@us...> - 2005-07-26 09:45:31
|
With Visual C++ 6.0, there is a means to automatically configure CppUnit = usage of RTTI. When the check box "Project Settings > C/C++ > C++ Language > Enable = Run-Time Type Information (RTTI)" is checked, the compiler defines the = symbol _CPPRTTI. CppUnit can easily take advantage of this feature to automatically = define CPPUNIT_HAVE_RTTI without user configuration. In file include\cppunit\config\config-msvc6.h Replace : /* define if the compiler supports Run-Time Type Identification */ #ifndef CPPUNIT_HAVE_RTTI=20 #define CPPUNIT_HAVE_RTTI 1=20 #endif By : /* define if the compiler supports Run-Time Type Identification */ #ifndef CPPUNIT_HAVE_RTTI=20 # ifdef _CPPRTTI // Defined by the compiler option /GR # define CPPUNIT_HAVE_RTTI 1 # else # define CPPUNIT_HAVE_RTTI 0 # endif #endif Vincent. |
From: <vi...@re...> - 2005-07-25 12:20:44
|
Hello, I would like to make a comment about doc on http://cppunit.sourceforge.net/doc/lastest/group___writing_test_plug_in.html : "You can define your one implementation" Maube you meant "You can define your OWN implementation" ? Thanks, Victor |
From: <vin...@fr...> - 2005-07-25 08:55:09
|
In file include\cppunit\config\config-msvc6.h the following line should be added : #define CPPUNIT_HAVE_CPP_CAST 1 This is because Visual C++ 6.0 really supports C++-style casts. I've tested with Visual C++ 6.0 SP6. Vincent. |
From: Thomas D. <th...@dr...> - 2005-07-24 12:46:13
|
Hello, can anybody help me, to find the reason why CPPUNIT_FAIL cause a SIGSEGV. thx in advance. ---------------------------------------------------------------------------------------- ostringstream ostr; .... } catch (const Exception &e ) { // if( e.Errno() != EINVAL ) { ostr.str(""); ostr << mesg.shortDescription() << "\n-- Unexpected Dns::Exception received !! \n--" << e.message() << "--\n"; cout << endl << ostr.str() << endl << endl; // here's nice output CPPUNIT_FAIL( ostr.str() ); // got sigsegv // } } --------------------------------------------------------------------------------------- -- mit freundlichem Gruß -- regards Thomas |
From: Baptiste L. <bl...@us...> - 2005-07-18 21:59:30
|
MessageDo you mean link error ? I don't understand how changing = something in a.cpp could fix the compilation of b.cpp... Do you have a sample to reproduce this ? I'm really curious. Baptiste. ----- Original Message -----=20 From: Gola Bartlomiej-ABG014=20 To: 'cpp...@li...'=20 Sent: Wednesday, July 13, 2005 12:06 PM Subject: [Cppunit-devel] A better version of = CPPUNIT_TEST_SUITE_REGISTRATION macro(?) Hi, I've encountered a problem when using CPPUNIT_TEST_SUITE_REGISTRATION = macro. I have several files with various tests and in each one of them = I'm using the above macro to register the test class. The problem arises = when you put the registration macro in the same line (but in the = separate files!) which generates compilation error (identifier = redefinition). To resolve the problem, I've modified the = CPPUNIT_TEST_SUITE_REGISTRATION macro: instead of using the = "autoRegisterRegistry__" prefix for a class name, a little bit more = complex syntax could be used. The modified macro: #define CPPUNIT_TEST_SUITE_REGISTRATION( ATestFixtureType ) \ static CPPUNIT_NS::AutoRegisterSuite< ATestFixtureType > \ CPPUNIT_MAKE_UNIQUE_NAME( CPPUNIT_JOIN(ATestFixtureType, = _AutoRegisterSuite_) ) The original version: #define CPPUNIT_TEST_SUITE_REGISTRATION( ATestFixtureType ) \ static CPPUNIT_NS::AutoRegisterSuite< ATestFixtureType > \ CPPUNIT_MAKE_UNIQUE_NAME(autoRegisterRegistry__ ) If you think it is a good idea I would more than happy if you used my = solution in the next CppUnit version. Best regards and thanks for a great test framework, Bartek Gola |
From: Baptiste L. <bl...@us...> - 2005-07-18 21:52:36
|
Thanks for reporting this. This should have been fixed in the lastest = dev snapshot version. Could you give 1.11.0 a shot and let me know if = the issue has been correctly fixed ? I believe it is only occurs with gcc 3.4 because it implements the two = phases look-up (correctly). Baptiste. --- Baptiste Lepilleur <bl...@us...> CppUnit maintainer OpenTest and CppUnit 2 developer. ----- Original Message -----=20 From: Graham Mark, CCN-12=20 To: cpp...@li...=20 Sent: Monday, July 18, 2005 10:10 PM Subject: [Cppunit-devel] gcc-3.4.4 fails to compile cppunit-1.10.2 = example I just got cppunit-1.10.2 and gcc-3.4.4. I successfully built gcc-3.4.4. The gnu organization requests = information about successful builds, which I'm sending to you for = reference. 772: config.guess i686-pc-linux-gnu 778: ../bin/gcc -v Reading specs from = /home/projects/nisac/current-third-party/lib/gcc/i686-pc-linux-gnu/3.4.4/= specs Configured with: ./configure = --prefix=3D/home/projects/nisac/current-third-party = --x-includes=3D/usr/X11R6/include --x-lib=3D/usr/X11R6/lib Thread model: posix gcc version 3.4.4 782: cat /etc/issue Red Hat Enterprise Linux WS release 3 (Taroon Update 5) Kernel \r on an \m 783: uname -a Linux localhost.localdomain 2.4.21-32.0.1.EL #1 Tue May 17 18:01:37 = EDT 2005 i686 i686 i386 GNU/Linux 784: rpm -q glibc glibc-2.3.2-95.33 cppunit compiled without error with gcc-3.4.4 after configuring as = follows (pwd was the directory where I built gcc). 807 export CC=3D`pwd`/bin/gcc 809 export CXX=3D`pwd`/bin/g++ 811 export CPPFLAGS=3D"-I `pwd`/include" configure --prefix=3D/home/projects/nisac/current-third-party = --with-gnu-ld CC=3D"$CC" CXX=3D"$CXX" CPPFLAGS=3D"$CPPFLAGS" Although the 'make' succeeded, 'make check' failed as shown below. = (All the other tests compiled and ran successfully.) make[1]: Entering directory = `/home/projects/nisac/current-third-party/cppunit-1.10.2/examples' Making check in hierarchy make[2]: Entering directory = `/home/projects/nisac/current-third-party/cppunit-1.10.2/examples/hierarc= hy' make hierarchy make[3]: Entering directory = `/home/projects/nisac/current-third-party/cppunit-1.10.2/examples/hierarc= hy' if /home/projects/nisac/current-third-party/bin/g++ -DHAVE_CONFIG_H = -I. -I. -I../../config -I../../include -I../../include -I = /home/projects/nisac/current-third-party/include -g -O2 -MT main.o -MD = -MP -MF ".deps/main.Tpo" \ -c -o main.o `test -f 'main.cpp' || echo './'`main.cpp; \ then mv -f ".deps/main.Tpo" ".deps/main.Po"; \ else rm -f ".deps/main.Tpo"; exit 1; \ fi In file included from main.cpp:6: ChessTest.h: In member function `void = ChessTest<GAMECLASS>::testNumberOfPieces()': ChessTest.h:19: error: `m_game' undeclared (first use this function) ChessTest.h:19: error: (Each undeclared identifier is reported only = once for each function it appears in.) ChessTest.h:19: error: no matching function for call to = `CppUnit::Asserter::failIf(<type error>, CppUnit::Message&, = CppUnit::SourceLine&)' ../../include/cppunit/Asserter.h:66: note: candidates are: static void = CppUnit::Asserter::failIf(bool, const CppUnit::Message&, const = CppUnit::SourceLine&) ../../include/cppunit/Asserter.h:77: note: static void = CppUnit::Asserter::failIf(bool, std::string, const CppUnit::SourceLine&) make[3]: *** [main.o] Error 1 make[3]: Target `hierarchy' not remade because of errors. I tried cppunit-1.10.2 under gcc-3.3.2. With that compiler, cppunit = successfully compiled and ran all tests. The test code that fails under gcc-3.4.4 looks okay to me, but I'm not = an expert. Is the failure due to a bug in the compiler, or to some = non-conformant code in the test that gcc previously accepted? Thanks. ----------- Graham Mark Simulation Science CCS-5, MS M997 Los Alamos National Laboratory 505-667-8147 |
From: Graham M. CCN-1. <ga...@la...> - 2005-07-18 20:10:14
|
I just got cppunit-1.10.2 and gcc-3.4.4. I successfully built gcc-3.4.4. The gnu organization requests information about successful builds, which I'm sending to you for reference. 772: config.guess i686-pc-linux-gnu 778: ../bin/gcc -v Reading specs from /home/projects/nisac/current-third-party/lib/gcc/i686-pc-linux-gnu/ 3.4.4/specs Configured with: ./configure --prefix=/home/projects/nisac/current-third-party --x-includes=/usr/X11R6/include --x-lib=/usr/X11R6/lib Thread model: posix gcc version 3.4.4 782: cat /etc/issue Red Hat Enterprise Linux WS release 3 (Taroon Update 5) Kernel \r on an \m 783: uname -a Linux localhost.localdomain 2.4.21-32.0.1.EL #1 Tue May 17 18:01:37 EDT 2005 i686 i686 i386 GNU/Linux 784: rpm -q glibc glibc-2.3.2-95.33 cppunit compiled without error with gcc-3.4.4 after configuring as follows (pwd was the directory where I built gcc). 807 export CC=`pwd`/bin/gcc 809 export CXX=`pwd`/bin/g++ 811 export CPPFLAGS="-I `pwd`/include" configure --prefix=/home/projects/nisac/current-third-party --with-gnu-ld CC="$CC" CXX="$CXX" CPPFLAGS="$CPPFLAGS" Although the 'make' succeeded, 'make check' failed as shown below. (All the other tests compiled and ran successfully.) make[1]: Entering directory `/home/projects/nisac/current-third-party/cppunit-1.10.2/examples' Making check in hierarchy make[2]: Entering directory `/home/projects/nisac/current-third-party/cppunit-1.10.2/examples/ hierarchy' make hierarchy make[3]: Entering directory `/home/projects/nisac/current-third-party/cppunit-1.10.2/examples/ hierarchy' if /home/projects/nisac/current-third-party/bin/g++ -DHAVE_CONFIG_H -I. -I. -I../../config -I../../include -I../../include -I /home/projects/nisac/current-third-party/include -g -O2 -MT main.o -MD -MP -MF ".deps/main.Tpo" \ -c -o main.o `test -f 'main.cpp' || echo './'`main.cpp; \ then mv -f ".deps/main.Tpo" ".deps/main.Po"; \ else rm -f ".deps/main.Tpo"; exit 1; \ fi In file included from main.cpp:6: ChessTest.h: In member function `void ChessTest<GAMECLASS>::testNumberOfPieces()': ChessTest.h:19: error: `m_game' undeclared (first use this function) ChessTest.h:19: error: (Each undeclared identifier is reported only once for each function it appears in.) ChessTest.h:19: error: no matching function for call to `CppUnit::Asserter::failIf(<type error>, CppUnit::Message&, CppUnit::SourceLine&)' ../../include/cppunit/Asserter.h:66: note: candidates are: static void CppUnit::Asserter::failIf(bool, const CppUnit::Message&, const CppUnit::SourceLine&) ../../include/cppunit/Asserter.h:77: note: static void CppUnit::Asserter::failIf(bool, std::string, const CppUnit::SourceLine&) make[3]: *** [main.o] Error 1 make[3]: Target `hierarchy' not remade because of errors. I tried cppunit-1.10.2 under gcc-3.3.2. With that compiler, cppunit successfully compiled and ran all tests. The test code that fails under gcc-3.4.4 looks okay to me, but I'm not an expert. Is the failure due to a bug in the compiler, or to some non-conformant code in the test that gcc previously accepted? Thanks. ----------- Graham Mark Simulation Science CCS-5, MS M997 Los Alamos National Laboratory 505-667-8147 |
From: Baptiste L. <bl...@us...> - 2005-07-16 07:01:50
|
I'm using automake 1.9.5 on SUSE 9.3. My rough guess (based on automake warning link explanation, I don't know much about automake) on how the patch introduce this error: the "quoting" introduce a separate "namespace" for the aclocal macro, and the declaration of DOC in that macro is put that "namespace". Hence DOC is no longer visible in doc/Makefile.am. Baptiste. ----- Original Message ----- From: "Brad Hards" <br...@fr...> To: <cpp...@li...> Cc: "Baptiste Lepilleur" <bl...@us...> Sent: Saturday, July 16, 2005 2:12 AM Subject: Re: [Cppunit-devel] Re: [patch] fix aclocal warning > I'm having trouble seeing how my patch changed this, but I'll take another > look. Can you tell me what automake version you are using? > > Brad |
From: Brad H. <br...@fr...> - 2005-07-16 00:14:06
|
On Sat, 16 Jul 2005 03:36 am, Baptiste Lepilleur wrote: > This patch does fix the warning, but it break the build: > > ./autogen.sh > /usr/share/aclocal/smpeg.m4:13: warning: underquoted definition of > AM_PATH_SMPEG > run info '(automake)Extending aclocal' > or see http://sources.redhat.com/automake/automake.html#Extending-acloc= al > Putting files in AC_CONFIG_AUX_DIR, `config'. > doc/Makefile.am:16: DOC does not appear in AM_CONDITIONAL > > =3D> the error reported concerning doc/Makefile.am cause autogen.sh to ab= ort > and the 'configure' script is not generated. DOC is defined in > config/bb_enable_doxygen.m4 but no longer seems visible in > doc/Makefile.am... I'm having trouble seeing how my patch changed this, but I'll take another= =20 look. Can you tell me what automake version you are using? Brad |
From: Baptiste L. <gai...@fr...> - 2005-07-15 17:46:43
|
arthur wrote: > I found an error in money_example.html. Below is the detail: Thanks for taking the time to report this. It has already been fixed in CVS. There is an updated documentation snapshot available on the wiki. Baptiste. --- Baptiste Lepilleur <bl...@us...> CppUnit maintainer OpenTest and CppUnit 2 developer. |
From: Baptiste L. <bl...@us...> - 2005-07-15 17:45:15
|
Martin Jacob wrote: > I have problem to build cppunit by using mingw. > > I using: > - Win 2000 > - MinGW-3.1.0-1 > - MSYS-1.0.10 > - msysDTK-1.0.1 > > ./configure works fine. > > when running mingw32-make I get the following errormessage > > Win32DynamicLibraryManager.cpp:1: > c:/Programme/Mingw/include/c++/3.2.3/mingw32/bits/os_defines.h:45:1: > warning: this is the location of the previous definition > In file included from c:/Programme/Mingw/include/windows.h:55, > from Win32DynamicLibraryManager.cpp:12: > c:/Programme/Mingw/include/winuser.h:3411: type specifier omitted for > parameter `BLENDFUNCTION' This has been fixed in CVS. Just add the following definition in the guilty cpp: #define BLENDFUNCTION void // for mingw & gcc Don't know why the mingw team did not fix the header to handle this by default. Anyone know ? Baptiste. --- Baptiste Lepilleur <bl...@us...> CppUnit maintainer OpenTest and CppUnit 2 developer. |
From: Baptiste L. <bl...@us...> - 2005-07-15 17:37:08
|
Baptiste Lepilleur wrote: > Running ./autogen.sh (or aclocal) with a recent CVS snapshot > produces a warning about underquoting. This patch fixes it. This patch does fix the warning, but it break the build: ./autogen.sh /usr/share/aclocal/smpeg.m4:13: warning: underquoted definition of AM_PATH_SMPEG run info '(automake)Extending aclocal' or see http://sources.redhat.com/automake/automake.html#Extending-aclocal Putting files in AC_CONFIG_AUX_DIR, `config'. doc/Makefile.am:16: DOC does not appear in AM_CONDITIONAL => the error reported concerning doc/Makefile.am cause autogen.sh to abort and the 'configure' script is not generated. DOC is defined in config/bb_enable_doxygen.m4 but no longer seems visible in doc/Makefile.am... The excerpt from doc/Makefile.am: # DOC is defined if installer requests doc generation. # [...] if DOC Anyone know how to fix this ? The patch seems desirable for the long term (the automake link above clearly state so), but I'll have to roll it back if no solution is found. Thanks, Baptiste. --- Baptiste Lepilleur <bl...@us...> CppUnit maintainer OpenTest and CppUnit 2 developer. > > Brad > > diff -u -4 -p -r1.2 bb_enable_doxygen.m4 > --- config/bb_enable_doxygen.m4 11 Mar 2003 20:34:11 -0000 1.2 > +++ config/bb_enable_doxygen.m4 13 Jun 2005 08:53:57 -0000 > @@ -1,5 +1,5 @@ > -AC_DEFUN(BB_ENABLE_DOXYGEN, > +AC_DEFUN([BB_ENABLE_DOXYGEN], |
From: Martin J. <mj...@ba...> - 2005-07-14 08:53:44
|
I have problem to build cppunit by using mingw. I using: - Win 2000 - MinGW-3.1.0-1 - MSYS-1.0.10 - msysDTK-1.0.1 ./configure works fine. when running mingw32-make I get the following errormessage g++ -DHAVE_CONFIG_H -I. -I. -I../../config -I../../include -I../../include -g -O2 -MT Win32DynamicLibraryManager.lo -MD -MP -MF .deps/Win32DynamicLibraryManager.Tpo -c Win32DynamicLibraryManager.cpp -o Win32DynamicLibraryManager.o Win32DynamicLibraryManager.cpp:11:1: warning: "NOMINMAX" redefined In file included from c:/Programme/Mingw/include/c++/3.2.3/mingw32/bits/c++config.h:34, from c:/Programme/Mingw/include/c++/3.2.3/iosfwd:44, from c:/Programme/Mingw/include/c++/3.2.3/ios:44, from c:/Programme/Mingw/include/c++/3.2.3/istream:44, from c:/Programme/Mingw/include/c++/3.2.3/sstream:44, from ../../include/cppunit/Portability.h:176, from Win32DynamicLibraryManager.cpp:1: c:/Programme/Mingw/include/c++/3.2.3/mingw32/bits/os_defines.h:45:1: warning: this is the location of the previous definition In file included from c:/Programme/Mingw/include/windows.h:55, from Win32DynamicLibraryManager.cpp:12: c:/Programme/Mingw/include/winuser.h:3411: type specifier omitted for parameter `BLENDFUNCTION' c:/Programme/Mingw/include/winuser.h:3411: parse error before `*' token c:\Programme\Mingw\bin\mingw32-make.exe[2]: *** [Win32DynamicLibraryManager.lo] Error 1 c:\Programme\Mingw\bin\mingw32-make.exe[2]: Leaving directory `d:/tmp/cppunit-1.10.2/src/cppunit' c:\Programme\Mingw\bin\mingw32-make.exe[1]: *** [all-recursive] Error 1 c:\Programme\Mingw\bin\mingw32-make.exe[1]: Leaving directory `d:/tmp/cppunit-1.10.2/src' c:\Programme\Mingw\bin\mingw32-make.exe: *** [all-recursive] Error 1 I google already a lot but I could not find any solution. Is there some on who can give me advise how to do? bye Martin |
From: arthur <ar...@us...> - 2005-07-14 06:49:23
|
Sorry for some error in previous email. If we want to the syntax like " CPPUNIT_ASSERT_EQUAL( expectedMoney, = money );"=A3=ACwe should implement the friend operator << function for class = money. Details in below: class Money { public: friend std::ostream &operator <<( std::ostream &os, const Money &money ) { os << money.m_amount; os << money.m_currency; return os; } }; Then it will work. -----=D3=CA=BC=FE=D4=AD=BC=FE----- =B7=A2=BC=FE=C8=CB: arthur [mailto:ar...@us...]=20 =B7=A2=CB=CD=CA=B1=BC=E4: 2005=C4=EA7=D4=C214=C8=D5 14:14 =CA=D5=BC=FE=C8=CB: 'cpp...@li...' =D6=F7=CC=E2: An error in document cppunit-1.10.2 I found an error in money_example.html. Below is the detail: void=20 MoneyTest::testAdd() { ... // Check CPPUNIT_ASSERT_EQUAL( expectedMoney =3D=3D money.getAmount() ); // = +=3D works ... } I think it should be=20 CPPUNIT_ASSERT_EQUAL( expectedMoney, money ); // +=3D works And I check the sample code, it is: CPPUNIT_ASSERT( expectedMoney =3D=3D money ); // add works Both is ok. Arthur Lee ar...@us... |
From: arthur <ar...@us...> - 2005-07-14 06:15:24
|
I found an error in money_example.html. Below is the detail: void MoneyTest::testAdd() { ... // Check CPPUNIT_ASSERT_EQUAL( expectedMoney == money.getAmount() ); // += works ... } I think it should be CPPUNIT_ASSERT_EQUAL( expectedMoney, money ); // += works And I check the sample code, it is: CPPUNIT_ASSERT( expectedMoney == money ); // add works Both is ok. Arthur Lee ar...@us... |
From: Gola Bartlomiej-A. <Bar...@mo...> - 2005-07-13 10:06:38
|
Hi, I've encountered a problem when using CPPUNIT_TEST_SUITE_REGISTRATION macro. I have several files with various tests and in each one of them I'm using the above macro to register the test class. The problem arises when you put the registration macro in the same line (but in the separate files!) which generates compilation error (identifier redefinition). To resolve the problem, I've modified the CPPUNIT_TEST_SUITE_REGISTRATION macro: instead of using the "autoRegisterRegistry__" prefix for a class name, a little bit more complex syntax could be used. The modified macro: #define CPPUNIT_TEST_SUITE_REGISTRATION( ATestFixtureType ) \ static CPPUNIT_NS::AutoRegisterSuite< ATestFixtureType > \ CPPUNIT_MAKE_UNIQUE_NAME( CPPUNIT_JOIN(ATestFixtureType, _AutoRegisterSuite_) ) The original version: #define CPPUNIT_TEST_SUITE_REGISTRATION( ATestFixtureType ) \ static CPPUNIT_NS::AutoRegisterSuite< ATestFixtureType > \ CPPUNIT_MAKE_UNIQUE_NAME(autoRegisterRegistry__ ) If you think it is a good idea I would more than happy if you used my solution in the next CppUnit version. Best regards and thanks for a great test framework, Bartek Gola |
From: Baptiste L. <bl...@us...> - 2005-07-09 14:20:26
|
Tina wrote: > Hello, > > I'm a newbie of CppUnit, and I followed your "Money,a step by step > example" in the "CppUnit Documentation Version 1.10.2". > > The steps of "Setting up your project(VC++)", "Running our tests", > "Adding the TestFixture" and "Our first tests" went well. But in > "Adding more tests", when I added the test "testAdd", there were some > problems. In the documents, you wrote: > > MoneyTest.cpp > void MoneyTest::testAdd() > { > // Set up > const Money money12FF( 12, "FF" ); > const Money expectedMoney( 135, "FF" ); > > // Process > Money money( 123, "FF" ); > money += money12FF; > > // Check > CPPUNIT_ASSERT_EQUAL( expectedMoney == money.getAmount() ); // += > works CPPUNIT_ASSERT( &money == &(money += money12FF) ); // += > returns ref. on 'this'. > > } > > It failed to compile. Because the CPPUNIT_ASSERT_EQUAL must have two > parameters, like CPPUNIT_ASSERT_EQUAL(expected,actual). Then I changed > it into CPPUNIT_ASSERT( expectedMoney.getAmount() == money.getAmount() > ), and it passed. Thanks, I reported the correction in the doc. > I want to know whether I could use > CPPUNIT_ASSERT_EQUAL(expected,actual) to finish my "testAdd"? And > how? Maybe I didn't really understand the meaning of > "CPPUNIT_ASSERT_EQUAL( expectedMoney == money.getAmount() )" you > wrote in your codes, so I hope you can help me:) No, the usage of CPPUNIT_ASSERT_EQUAL in the tutorial was a "bug". The following requirement applied to a type used in CPPUNIT_ASSERT_EQUAL (assuming there is no specialization of the template CppUnit::assertion_traits<T> for the type): - it must be comparable with == - it must be serializable in a std::ostream (e.g. the function "std::ostream &operator <<( std::ostream &os, const MyType &value )" must be defined). Since Money already have operator ==, the only thing we need to provide is std::ostream support: In Money.h: #include <iostream> // at the end of the file: inline std::ostream &operator <<( std::ostream &os, const Money &value ) { return os << "Money< value =" << value.getAmount() << "; currency = " << value.getCurrency() << ">"; } It is now possible to use the CPPUNIT_ASSERT_EQUAL macro: CPPUNIT_ASSERT_EQUAL( expectedMoney, money ); // add works Baptiste. |