cppunit-devel Mailing List for CppUnit - C++ port of JUnit (Page 30)
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: Tirumala, B. (IE10) <Tir...@ho...> - 2002-09-30 07:12:42
|
Hi , I am not very clear with decorator funtionality of CPPUNIT. what exactly we are achieving by having TestSetup.h. Can u please clarify me .And if i need to use this i class, i have to derive my testcase from setup, right ? And when testcases have been added to the suite and run at once, the same SetUp method is called for all the testcases in the same suite, right . means same state will be set up for all the testcases in a same suite. If i need to have different state for testcases in the same suite ,How can i do that ? Expecting a reply ASAP Looking forward for the response. Thanks Tirumala |
From: Mike C. <ra...@ro...> - 2002-09-27 11:22:59
|
Hello, I posted a bug to the tracker today because I get errors when trying to build the CPPUnit 1.8.0. Here is the output from the process: -----start output----- -[~/Applications/cppunit-1.8.0]> ./configure checking for a BSD compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for mawk... no checking for gawk... no checking for nawk... no checking for awk... awk checking whether make sets ${MAKE}... yes checking whether make sets ${MAKE}... (cached) yes checking for a BSD compatible install... /usr/bin/install -c checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for executable suffix... checking for object suffix... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking build system type... powerpc-apple-darwin6.0 checking host system type... powerpc-apple-darwin6.0 checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... no checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -p checking whether ln -s works... yes checking how to recognise dependant libraries... fiok_magic Mach-O dynamically linked shared library checking how to run the C++ preprocessor... g++ -E checking for dlfcn.h... no checking for ranlib... ranlib checking for strip... strip checking for objdir... .libs checking for gcc option to produce PIC... -fno-common checking if gcc PIC flag -fno-common works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... no checking if we can lock with hard links... yes checking if gcc supports -fno-rtti -fno-exceptions... yes checking whether the linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... unsupported checking whether stripping libraries is possible... no checking dynamic linker characteristics... darwin6.0 dyld checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes creating libtool checking for doxygen... no checking for cmath... yes checking whether the compiler supports Run-Time Type Identification... yes checking whether the compiler implements namespaces... yes checking whether std::string::compare takes a string in argument 1... no checking whether the compiler has stringstream... yes checking whether the library defines class strstream... checking for strstream... yes yes configure: creating ./config.status config.status: creating Makefile config.status: creating cppunit.spec config.status: creating cppunit-config config.status: creating src/Makefile config.status: creating src/cppunit/Makefile config.status: creating include/Makefile config.status: creating include/cppunit/Makefile config.status: creating include/cppunit/extensions/Makefile config.status: creating include/cppunit/ui/Makefile config.status: creating include/cppunit/ui/mfc/Makefile config.status: creating include/cppunit/ui/qt/Makefile config.status: creating include/cppunit/ui/text/Makefile config.status: creating doc/Makefile config.status: creating doc/Doxyfile config.status: creating examples/Makefile config.status: creating examples/hierarchy/Makefile config.status: creating examples/cppunittest/Makefile config.status: creating config/config.h config.status: config/config.h is unchanged creating include/cppunit/config-auto.h - prefix CPPUNIT for config/config.h defines /* automatically generated config/ contrib/ doc/ examples/ include -[mcn@RadBook]-[11:04:56:27/09/2002] -[~/Applications/cppunit-1.8.0]> make make: *** No rule to make target `config/ac_cxx_string_compare_string_first.m4', needed by `aclocal.m4'. Stop. ------End Output------ I have attached the config.log file, and the generated Makefile for your browsing. Please let me know what I can do to make CPPUnit 1.8.0 build so that I can get to work on the Kmymoney2 STL engine. :) Thanks for the help! |
From: Allen U. <All...@ve...> - 2002-09-21 09:54:54
|
I ran into a issue using a custom Outputter with TestRunner. They end up using different TestResultCollector objects so the results to make it to the Outputter. I moved the TestResultCollector to the Outputter base class and added a getResultCollector() method. This allows TestRunner to get the Outputter's collector. The attached diff is against cppunit-1.8.0 -allen |
From: Rim, M. <mar...@cs...> - 2002-09-19 16:55:41
|
this topic probably outside the scope of cppunit per se. ... but try fork-ing and wait-ing for the exit code. on solaris, i think the exit code for a core dump is like 128 + signal-code. ----- Original Message ----- From: "Richard Uhlmann" <ric...@im...> To: <cpp...@li...> Sent: Monday, September 16, 2002 12:59 PM Subject: [Cppunit-devel] How can I continue after "segmentation fault" > Hi, > can anybody tell me, how I can startover to the next test within my > testsuite, after a system error has occured > within one of my tests like "bus trap, segmentation fault..." > Catching the exception as it is shown in the "money-example" > does not work, because the OS is terminating my process at once. > (I am using cppunit under Linux) > regards Richard This message is for the named person's use only. It may contain sensitive and private proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. CREDIT SUISSE GROUP and each legal entity in the CREDIT SUISSE FIRST BOSTON or CREDIT SUISSE ASSET MANAGEMENT business units of CREDIT SUISSE FIRST BOSTON reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. Unless otherwise stated, any pricing information given in this message is indicative only, is subject to change and does not constitute an offer to deal at any price quoted. Any reference to the terms of executed transactions should be treated as preliminary only and subject to our formal written confirmation. |
From: Steffen H. <ste...@we...> - 2002-09-19 04:39:44
|
Hello Baptiste, Hello all, I want to use CppUnit feature "Plugin" integrated. That means, there can be tests at start time of the TestRunner and the possibility to plugin a test dll without losing all existing tests. To control this, there was not a lot to do. But in the other way I also want to remove this plugin Dll. That means I need to remove all tests from this dll, but all other tests which don`t belong to this plugin should stay in. I think using "PluginManager::unload" is helping a little bit, because unregistering is done by this and the destructor of the affected TestSuite(s)is called. But in fact the pointer to this deleted TestSuite(s) will stay in the root TestSuite. So I have links to deleted data what causes terrible problems for me. So I helped myself with a little additional method in class TestSuite to delete this link out from the Vector. But I don`t think that this is a good solution. But I think the plugin feature should be completely supported in the way I described. That means adding and removing test plugins at runtime without any consequences to other tests. Maybe anyone could help me now. Best regards Steffen "Baptiste Lepilleur" <gai...@fr...> schrieb am 18.09.02 19:48:54: > You may have a look at AutoRegisterSuite destructor to see how to unregister > a TestFactory, but I don't guaranty anything. The test registry has not been > designed to be used that way. > > It is not possible to remove test from a test suite. > > If I may ask, why do you need that ? TestFactory are for static time > registration. TestRunner allow to run only a selected set of UT. > > Baptiste. > > ----- Original Message ----- > From: "Steffen Huebner" <ste...@we...> > To: <cpp...@li...> > Sent: Tuesday, September 17, 2002 1:23 PM > Subject: [Cppunit-devel] Addon for "Unregister a TestFactory" > > > > Hello again, > > > > I have forgotten to ask for removing single tests from a TestSuite. I just > can only remove all tests from a TestSuite. > > > > Is there a possibility to remove tests from a TestSuite? > > > > Thanks so far > > > > Steffen > > > ______________________________________________________________________________ Jetzt testen fur 1 Euro! Ihr All-in-one-Paket! https://digitaledienste.web.de/Club/?mc=021106 |
From: Baptiste L. <gai...@fr...> - 2002-09-18 17:48:57
|
You may have a look at AutoRegisterSuite destructor to see how to unregister a TestFactory, but I don't guaranty anything. The test registry has not been designed to be used that way. It is not possible to remove test from a test suite. If I may ask, why do you need that ? TestFactory are for static time registration. TestRunner allow to run only a selected set of UT. Baptiste. ----- Original Message ----- From: "Steffen Huebner" <ste...@we...> To: <cpp...@li...> Sent: Tuesday, September 17, 2002 1:23 PM Subject: [Cppunit-devel] Addon for "Unregister a TestFactory" > Hello again, > > I have forgotten to ask for removing single tests from a TestSuite. I just can only remove all tests from a TestSuite. > > Is there a possibility to remove tests from a TestSuite? > > Thanks so far > > Steffen |
From: Baptiste L. <gai...@fr...> - 2002-09-18 17:42:36
|
As far as I know, it is not possible on Unix. There was an old discussion on this list on a attempt to catch signal and indicating a test failure, but it was not successful. Baptiste. ----- Original Message ----- From: "Richard Uhlmann" <ric...@im...> To: <cpp...@li...> Sent: Monday, September 16, 2002 12:59 PM Subject: [Cppunit-devel] How can I continue after "segmentation fault" > Hi, > can anybody tell me, how I can startover to the next test within my > testsuite, after a system error has occured > within one of my tests like "bus trap, segmentation fault..." > Catching the exception as it is shown in the "money-example" > does not work, because the OS is terminating my process at once. > (I am using cppunit under Linux) > regards Richard > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > > |
From: Steffen H. <ste...@we...> - 2002-09-17 11:23:33
|
Hello again, I have forgotten to ask for removing single tests from a TestSuite. I just can only remove all tests from a TestSuite. Is there a possibility to remove tests from a TestSuite? Thanks so far Steffen ______________________________________________________________________________ WEB.DE MyPage - Ohne Computerkenntnisse in nur 5 Minuten online! Alles inklusive! Kinderleicht! http://www.das.ist.aber.ne.lustige.sache.ms/ |
From: Steve M. R. <ste...@vi...> - 2002-09-17 05:54:12
|
On Thu, Sep 12, 2002 at 08:42:59AM +0200, Richard Uhlmann wrote: > Hi, > I am new with cppunit, but when I try out the very > first example from the cookbook, the linker exits with errors. > > I think, the package is well installed on my linux machine > within: /usr/local/stow/cppunit-1.8.0 > I added /usr/local/stow/cppunit-1.8.0/include to PATH > I copied libcppunit.a to my working dir: ~cppunit > > I created the file complex.cpp, tried to compile with: > g++ libcppunit.a complex.cpp > and got the errors at the end of the message > can you help me or give me a working example? You forgot to link against the library. Append "-L /usr/local/stow/cppunit-1.8.0/lib -lcppunit" or similar to your build command. -S |
From: Steffen H. <ste...@we...> - 2002-09-17 05:44:52
|
Hello, maybe someone of you could help me with this: How can I unregister a TestSuite(TestFactory)? The TestFactory instance comes with the CPPUNIT_TEST_SUITE_REGISTRATION macro but isn't accessible after registration. So I don`t know how to handle: "TestFactoryRegistry::getRegistry().unregisterFactory(TestFactory *factory)" Thanks Steffen ______________________________________________________________________________ Die clevere Geldreserve: der DiBa-Privatkredit. Funktioniert wie ein Dispo, ist aber viel gunstiger! Alle Infos: http://diba.web.de/?mc=021104 |
From: Richard U. <ric...@im...> - 2002-09-16 10:59:21
|
Hi, can anybody tell me, how I can startover to the next test within my testsuite, after a system error has occured within one of my tests like "bus trap, segmentation fault..." Catching the exception as it is shown in the "money-example" does not work, because the OS is terminating my process at once. (I am using cppunit under Linux) regards Richard |
From: Philippe L. <phi...@ca...> - 2002-09-13 14:56:38
|
I set my programs to \MDd and it works fine. Using \MTd wil crash and burn badly. Perhaps you are having the same problem. Phil PS That's with VS7.0 -----Original Message----- From: Florin Stoian [mailto:st...@ix...]=20 Sent: Friday, September 13, 2002 8:33 AM To: cpp...@li... Subject: [Cppunit-devel] debug multithreaded dll is there a library file that supports the=20 debug multithreaded dll code generation. i've searched and tried and it did not work. either would not build because of numerous link erros either it would build but crash on execute ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Cppunit-devel mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppunit-devel |
From: Florin S. <st...@ix...> - 2002-09-13 12:33:33
|
is there a library file that supports the debug multithreaded dll code generation. i've searched and tried and it did not work. either would not build because of numerous link erros either it would build but crash on execute |
From: FUKUDA F. <ff...@nt...> - 2002-09-13 07:50:13
|
>Would you mind trying with cppunit 1.9.8 ? You can get it there: >http://cppunit.sourceforge.net/snapshot/ a friend of mine gave me a same report using CppUnit 1.8.0 & Solaris8 gcc2.95.3 and he also said the difficulty (core-dumped @ make check) was still remained even using CppUnit 1.9.8/1.9.10...not fixed yet... -----:-----:-----:-----:-----:-----:-----:-----:-----:----- FUKUDA (episteme) Fumiki -- magical, but never a magic... |
From: Richard U. <ric...@im...> - 2002-09-12 06:43:06
|
Hi, I am new with cppunit, but when I try out the very first example from the cookbook, the linker exits with errors. I think, the package is well installed on my linux machine within: /usr/local/stow/cppunit-1.8.0 I added /usr/local/stow/cppunit-1.8.0/include to PATH I copied libcppunit.a to my working dir: ~cppunit I created the file complex.cpp, tried to compile with: g++ libcppunit.a complex.cpp and got the errors at the end of the message can you help me or give me a working example? thanks Richard ================================================================= complex.cpp: =========== #include <sstream> using namespace std; #include "cppunit/TestCase.h" using namespace CppUnit; class Complex { friend bool operator==(const Complex &a, const Complex &b); double real, imaginary; public: Complex(double r, double i=0) :real(r), imaginary(i) {} }; bool operator==( const Complex &a, const Complex &b ){ bool b0=false; b0 = (a.real== b.real) && (a.imaginary == b.imaginary); return b0; //return eq(a.real, b.real) && eq(a.imaginary, b.imaginary); } class ComplexNumberTest : public CppUnit::TestCase{ public: ComplexNumberTest( std::string name ) : CppUnit::TestCase( name ) {} ComplexNumberTest( ) : CppUnit::TestCase( ) {} void runTest(){ CPPUNIT_ASSERT( Complex(10,1) == Complex (10,1) ); CPPUNIT_ASSERT( !(Complex(1,1) == Complex (2,2)) ); } }; int main(int argc, char** argv) { //string myname; ComplexNumberTest *mytest; mytest = new ComplexNumberTest(); return 0; } ================================================================= ================================================================= /tmp/ccLCWwmm.o(.rodata+0xa8): undefined reference to `CppUnit::TestCase type_info node' /tmp/ccLCWwmm.o: In function `ComplexNumberTest::ComplexNumberTest(void)': /tmp/ccLCWwmm.o(.ComplexNumberTest::gnu.linkonce.t.(void)+0xf): undefined reference to `CppUnit::TestCase::TestCase(void)' /tmp/ccLCWwmm.o(.ComplexNumberTest::gnu.linkonce.t.(void)+0x3d): undefined reference to `CppUnit::TestCase::~TestCase(void )' /tmp/ccLCWwmm.o(.gnu.linkonce.d.__vt_17ComplexNumberTest+0xc): undefined reference to `CppUnit::TestCase::run(CppUnit::Tes tResult *)' $ g++ libcppunit.a complex.cpp /tmp/cc6dkxjM.o(.rodata+0xa8): undefined reference to `CppUnit::TestCase type_info node' /tmp/cc6dkxjM.o: In function `ComplexNumberTest::ComplexNumberTest(void)': /tmp/cc6dkxjM.o(.ComplexNumberTest::gnu.linkonce.t.(void)+0xf): undefined reference to `CppUnit::TestCase::TestCase(void)' /tmp/cc6dkxjM.o(.ComplexNumberTest::gnu.linkonce.t.(void)+0x3d): undefined reference to `CppUnit::TestCase::~TestCase(void)' /tmp/cc6dkxjM.o(.gnu.linkonce.d.__vt_17ComplexNumberTest+0xc): undefined reference to `CppUnit::TestCase::run(CppUnit::TestResult *)' /tmp/cc6dkxjM.o(.gnu.linkonce.d.__vt_17ComplexNumberTest+0x10): undefined reference to `CppUnit::TestCase::countTestCases(void) const' /tmp/cc6dkxjM.o(.gnu.linkonce.d.__vt_17ComplexNumberTest+0x14): undefined reference to `CppUnit::TestCase::getName(void) const' /tmp/cc6dkxjM.o(.gnu.linkonce.d.__vt_17ComplexNumberTest+0x18): undefined reference to `CppUnit::TestCase::toString(void) const' /tmp/cc6dkxjM.o(.gnu.linkonce.d.__vt_17ComplexNumberTest+0x1c): undefined reference to `CppUnit::TestCase::run(void)' /tmp/cc6dkxjM.o: In function `ComplexNumberTest::~ComplexNumberTest(void)': /tmp/cc6dkxjM.o(.gnu.linkonce.t._._17ComplexNumberTest+0x21): undefined reference to `CppUnit::TestCase::~TestCase(void)' /tmp/cc6dkxjM.o: In function `ComplexNumberTest type_info function': /tmp/cc6dkxjM.o(.gnu.linkonce.t.__tf17ComplexNumberTest+0x10): undefined reference to `CppUnit::TestCase type_info function' /tmp/cc6dkxjM.o: In function `ComplexNumberTest::runTest(void)': /tmp/cc6dkxjM.o(.ComplexNumberTest::gnu.linkonce.t.runTest(void)+0x45): undefined reference to `CppUnit::SourceLine::SourceLine(basic_string<char, stri ng_char_traits<char>, __default_alloc_template<true, 0> > const &, int)' /tmp/cc6dkxjM.o(.ComplexNumberTest::gnu.linkonce.t.runTest(void)+0xc1): undefined reference to `CppUnit::Asserter::failIf(bool, basic_string<char, stri ng_char_traits<char>, __default_alloc_template<true, 0> >, CppUnit::SourceLine)' /tmp/cc6dkxjM.o(.ComplexNumberTest::gnu.linkonce.t.runTest(void)+0x120): undefined reference to `CppUnit::SourceLine::SourceLine(basic_string<char, str ing_char_traits<char>, __default_alloc_template<true, 0> > const &, int)' /tmp/cc6dkxjM.o(.ComplexNumberTest::gnu.linkonce.t.runTest(void)+0x197): undefined reference to `CppUnit::Asserter::failIf(bool, basic_string<char, str ing_char_traits<char>, __default_alloc_template<true, 0> >, CppUnit::SourceLine)' collect2: ld returned 1 exit status $ -- =============================================================== Richard Uhlmann Tel.: ++49-9131/7518-47 imbus AG Fax: ++49-9131/7518-50 Kleinseebacherstr. 9 D-91096 Moehrendorf http://www.imbus.de Germany email: ric...@im... =============================================================== |
From: Baptiste L. <gai...@fr...> - 2002-09-04 17:59:43
|
Sorry to say that, but this function has been rewritten a while ago (and gained a few UT on the way). It has moved to StringTools::wrap(). Check out the 1.9.10 tar ball and let me know if the issue still exist. Concerning a GUI for Borland C++, you may want to check out http://xprogramming.com/. There was a split based on the original version of CppUnit provided with a GUI. Though in my mind, post-build testing and test plug-ins pretty much remove the need for a GUI (haven't used one in over 4 months). Baptiste. ----- Original Message ----- From: "Phil Elliott" <Phi...@Ve...> To: <cpp...@li...> Sent: Wednesday, September 04, 2002 11:20 AM Subject: [Cppunit-devel] Wrap Function in CompilerOutput I have been testing the CPPUnit using C++Builder and have found a problem with the wrap function in that it does not print out the failure line correctly. This is smething to do with the std::string library and the way in which the constructor works. When constructing a string with the same name as a parameter there appears to be a conflict between the destruction and construction. To overcome this I gave the second use a different name and this corrected the problem. Here is a copy of the corrected code. std::string CompilerOutputter::wrap( std::string message ) { Lines lines = splitMessageIntoLines( message ); std::string wrapped; for ( Lines::iterator it = lines.begin(); it != lines.end(); ++it ) { std::string line( *it ); const int maxLineLength = 80; int index =0; while ( index < line.length() ) { std::string line2( line.substr( index, maxLineLength ) ); wrapped += line2; index += maxLineLength; if ( index < line.length() ) wrapped += "\n"; } wrapped += '\n'; } return wrapped; } I know that there has been development for MVC6, but do you know of any developments for a windows front end using C Builder, as I am currently using a console application. Like the functionality available. Phil Elliott. > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Phil Elliott > Development Manager > > VEMIS > Vehicle Telematics Solutions > > 18 Pebble Close Business Village, > Amington, Tamworth, Staffordshire, B77 4RD. > Tel : 01827 311912 Fax: 01827 311916 > Phi...@ve... www.vemis.com > > A DaimlerChrysler Company > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
From: Phil E. <Phi...@Ve...> - 2002-09-04 09:19:26
|
I have been testing the CPPUnit using C++Builder and have found a problem with the wrap function in that it does not print out the failure line correctly. This is smething to do with the std::string library and the way in which the constructor works. When constructing a string with the same name as a parameter there appears to be a conflict between the destruction and construction. To overcome this I gave the second use a different name and this corrected the problem. Here is a copy of the corrected code. std::string CompilerOutputter::wrap( std::string message ) { Lines lines =3D splitMessageIntoLines( message ); std::string wrapped; for ( Lines::iterator it =3D lines.begin(); it !=3D lines.end(); ++it = ) { std::string line( *it ); const int maxLineLength =3D 80; int index =3D0; while ( index < line.length() ) { std::string line2( line.substr( index, maxLineLength ) ); wrapped +=3D line2; index +=3D maxLineLength; if ( index < line.length() ) wrapped +=3D "\n"; } wrapped +=3D '\n'; } return wrapped; } I know that there has been development for MVC6, but do you know of any developments for a windows front end using C Builder, as I am currently using a console application. Like the functionality available. Phil Elliott. > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Phil Elliott > Development Manager >=20 > VEMIS > Vehicle Telematics Solutions >=20 > 18 Pebble Close Business Village, > Amington, Tamworth, Staffordshire, B77 4RD. > Tel : 01827 311912 Fax: 01827 311916 =20 > Phi...@ve... www.vemis.com >=20 > A DaimlerChrysler Company > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 >=20 |
From: Baptiste L. <gai...@fr...> - 2002-09-02 06:27:49
|
Sorry, but both files changed a lot since 1.8.0. Could you check out the lastest release (1.9.10) and let me know if there is any remaining issues ? Baptiste. ----- Original Message ----- From: <gro...@ez...> To: <cpp...@li...> Sent: Monday, September 02, 2002 12:53 AM Subject: [Cppunit-devel] CPPUNIT V1.8.0 compatibility with Borland C++ Builder V6 > Hi, > > I am using CppUnit (v 1.8.0) with Borland's C++ Builder Version 6, on > Windows 2000, and I found that I needed to change the following 2 files to > allow for compilation. > > (See attached file: TestResult.cpp)(See attached file: TypeInfoHelper.cpp) > > I hope this helps. > > Cheers Graeme Rodaughan. > > |
From: Baptiste L. <gai...@fr...> - 2002-09-02 06:26:09
|
Thanks. Fixed it. Baptiste. ----- Original Message ----- From: "FUKUDA Fumiki" <ff...@nt...> To: <cpp...@li...> Sent: Monday, September 02, 2002 4:58 AM Subject: [Cppunit-devel] include-guard error on 1.9.10 (was: CppUnit 1.9.10 snapshot available) > Hi, > > --- "[Cppunit-devel] [Announce] CppUnit 1.9.10 snapshot available" / Baptiste Lepilleur --- > > >http://cppunit.sourceforge.net/snapshot/cppunit-1.9.10.tar.gz > >http://cppunit.sourceforge.net/snapshot/cppunit-docs-1.9.10.tar.gz > > Enjoy, > > include/cppunit/ui/text/TextTestRunner.h > include-guard is as follows: > > #ifndef CPPUNIT_TEXTTSTRUNNER_H_ > #define CPPUNIT_TEXTTSTRUNNER_H_ > > ...oops! it's identical to include/cppunit/TextTestRunner.h > > so it should change to: > > #ifndef CPPUNIT_UI_TEXT_TEXTTESTRUNNER_H > #define CPPUNIT_UI_TEXT_TEXTTESTRUNNER_H > > # another headers are OK? |
From: FUKUDA F. <ff...@nt...> - 2002-09-02 03:01:30
|
Hi, --- "[Cppunit-devel] [Announce] CppUnit 1.9.10 snapshot available" / Baptiste Lepilleur --- >http://cppunit.sourceforge.net/snapshot/cppunit-1.9.10.tar.gz >http://cppunit.sourceforge.net/snapshot/cppunit-docs-1.9.10.tar.gz > Enjoy, include/cppunit/ui/text/TextTestRunner.h include-guard is as follows: #ifndef CPPUNIT_TEXTTSTRUNNER_H_ #define CPPUNIT_TEXTTSTRUNNER_H_ ...oops! it's identical to include/cppunit/TextTestRunner.h so it should change to: #ifndef CPPUNIT_UI_TEXT_TEXTTESTRUNNER_H #define CPPUNIT_UI_TEXT_TEXTTESTRUNNER_H # another headers are OK? -----:-----:-----:-----:-----:-----:-----:-----:-----:----- FUKUDA (episteme) Fumiki -- magical, but never a magic... |
From: <gro...@ez...> - 2002-09-01 22:54:10
|
Hi, I am using CppUnit (v 1.8.0) with Borland's C++ Builder Version 6, on Windows 2000, and I found that I needed to change the following 2 files to allow for compilation. (See attached file: TestResult.cpp)(See attached file: TypeInfoHelper.cpp) I hope this helps. Cheers Graeme Rodaughan. |
From: Baptiste L. <gai...@fr...> - 2002-08-30 21:15:08
|
Well, with this release CppUnit began its travel toward portability. Support for custom exception base class (such as CException for example) has finally been added . API to write custom test case macro has also been simplified. The tar balls can be found at: http://cppunit.sourceforge.net/snapshot/ http://cppunit.sourceforge.net/snapshot/cppunit-1.9.10.tar.gz http://cppunit.sourceforge.net/snapshot/cppunit-docs-1.9.10.tar.gz Enjoy, Baptiste. New in CppUnit 1.9.10: --------------------- - Major portability improvement - Protector - HelperMacros - MFC TestRunner bug fixes - Failure diagnostic - Asserter * Major portability improvement: - Much work has been done to reduce C++ feature requirement to compile CppUnit. It should now be possible to compile CppUnit on most compilers, as long as STL are available (in std namespace or not), with some form of strstream and iostream, as well as exception support. See CodingGuideLines.txt for details. * Protector - Protector can be passed to the TestResult to 'protect' call to setUp(), runTest() and tearDown() method. With this, it is easy to capture exceptions which do not have std::exception as a base class, such as CException or RWXMsg for example. TestResult and Protector class documentation. Look at src/cppunit/DefaultProtector.cpp for an example of implementation. * Helper macros - Mostly rewritten. It no longer use TestSuiteBuilder. A new object TestSuiteBuilderContext was introduced. It is used to name test case, create test fixture instance and add test to the fixture suite. It is now much more easier to add custom test cases using CPPUNIT_TEST_SUITE_ADD_CUSTOM_TESTS. Should also prevent most compability break concerning that macro. - Useful typedef are now public: TestFixtureType, ParentTestFixtureType. - New typedef for custom test method parameter: typedef TestSuiteBuilderContext<TestFixtureType> TestSuiteBuilderContextType; - added support for abstract test fixture with CPPUNIT_TEST_SUITE_END_ABSTRACT(). See documentation for further detail. * Failure diagnostic - setUp() and tearDown() now provides a detailed diagnostic of the failure (assertion, exception...) - If RTTI is allowed to extract type info, CppUnit will report the actual exception type in the diagnostic. * Asserter: - A new AdditionalMessage class has been introduced. It is used for assertion that takes an additional 'message' argument (CPPUNIT_ASSERT_MESSAGE...). Since this macro has an implicit constructor that take a string, which creates a Message with the specified string as detail. That way, additional message can be a single string or a complex Message object. See documentation for example of use. * Bug Fix: - MFC TestRunner: bug #530426 (conflict between TestRunner and host application's resources). A huge thanks to Steven Mitter for that one. - MFC TestRunner: Browse button is now disabled while running test. * Deprecated - CppUnit::TextUi::TestRunner moved to CppUnit::TextTestRunner. - CppUnit::MfcUi::TestRunner moved to CppUnit::MfcTestRunner. - CppUnit::QtUi::TestRunner moved to CppUnit::QtTestRunner. * Compatiblity break: - CppUnitTextUi::TestRunner, removed runTestByName() and runTest(). - TestSuiteBuilder: removed templatized method addTestCallerForException(). See implementation of CPPUNIT_TEST_EXCEPTION implementation for an alternative. - TestAssert: removed deprecated functions (those not using SourceLine) assertImplementation(), assertNotEqualImplementation(), assertEquals(). Moved non deprecated functions assertEquals() and assertEquals() into CppUnit namespace. - Plug-ins 'Parameters' typedef has been replaced by class PlugInParameters. The method commandLine() returns what used to be in Parameters[0]. This should avoid future compatibility break when the parameters passing API will be defined. - TestPlugIn::initialize() now takes a PlugInParameters in argument instead of a Parameters. - template <class T> void assertEquals() no longer has a default message value (no impact, unless you used this function directly instead of assertion macros). - HelperMacros: renamed CPPUNIT_TEST_ADD to CPPUNIT_TEST_SUITE_ADD_TEST. - HelperMacros: removed CPPUNIT_TEST_CUSTOM. Instead use CPPUNIT_TEST_SUITE_ADD_CUSTOM_TESTS and call context.addTest() passing the test that was returned. - HelperMacros: renamed CPPUNIT_TEST_CUSTOMS to CPPUNIT_TEST_SUITE_ADD_CUSTOM_TESTS. Changed method signature to static void aMethodName( TestSuiteBuilderContextType &context ). You can replace the 3 previous parameters by context. (See documentation for further detail). --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/ |
From: Baptiste L. <gai...@fr...> - 2002-08-27 20:52:09
|
Would you mind trying with cppunit 1.9.8 ? You can get it there: http://cppunit.sourceforge.net/snapshot/ I remember changing the main() implementation, but not the specific. = Also, the TestFactoryRegistry is more robust concerning TestFactory = initialization/uninitialization. Baptiste. ----- Original Message -----=20 From: wangleiyu=20 To: cpp...@li...=20 Sent: Monday, August 26, 2002 11:40 AM Subject: [Cppunit-devel] Question about CppUnit on Solaris8 hello, these times i'm using CppUnit(Release 1.8.0) to do unit = testing. On win2000 & linux, it's ok(and easy to use :) ), but on solaris8 it = core dumped. what i did is as following: 1. gunzip cppunit-1.8.0.tar.gz 2. tar xvf cppunit-1.8.0.tar 3. cd cppunit-1.8.0 4. configure ( no option, no argument)=20 (there was a warning, and the result is as following) 5. make (ok) 6. make check=20 the program throwed an exception and then core dumped : make check-TESTS make[3]: Entering directory `/export/home/Tools/CppUnit/cppunit- = 1.8.0/examples/hierarchy' ..The following test fails, this is intended: Abort - core dumped FAIL: hierarchy =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1 of 1 tests failed =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 my machine environment: solaris8 gcc2.95.3 Hope your help and lots of thanks :) = Yours sincerely=20 = wangleiyu 2002-08-26 Configuration Result: checking for a BSD compatible install... config/install-sh -c checking whether build environment is sane... yes checking for mawk... no checking for gawk... gawk checking whether make sets ${MAKE}... yes checking whether make sets ${MAKE}... (cached) yes checking for a BSD compatible install... config/install-sh -c checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for executable suffix... checking for object suffix... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc checking build system type... sparc-sun-solaris2.8 checking host system type... sparc-sun-solaris2.8 checking for ld used by GCC... /usr/ccs/bin/ld checking if the linker (/usr/ccs/bin/ld) is GNU ld... no checking for /usr/ccs/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/ccs/bin/nm -p checking whether ln -s works... yes checking how to recognise dependant libraries... pass_all checking command to parse /usr/ccs/bin/nm -p output... ok checking how to run the C++ preprocessor... g++ -E checking for dlfcn.h... yes checking for ranlib... ranlib checking for strip... strip checking for objdir... .libs checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... no checking if we can lock with hard links... yes checking if gcc supports -fno-rtti -fno-exceptions... yes checking whether the linker (/usr/ccs/bin/ld) supports shared = libraries... *** Warning: Releases of GCC earlier than version 3.0 cannot reliably *** create self contained shared libraries on Solaris systems, without *** introducing a dependency on libgcc.a. Therefore, libtool is = disabling *** -no-undefined support, which will at least allow you to build = shared *** libraries. However, you may find that when you link such = libraries *** into an application without using GCC, you have to manually add *** `gcc --print-libgcc-file-name` to the link command. We urge you = to *** upgrade to a newer version of GCC. Another option is to rebuild = your *** current GCC to use the GNU linker from GNU binutils 2.9.1 or = newer. yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... no checking dynamic linker characteristics... solaris2.8 ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes creating libtool checking for doxygen... no checking for cmath... yes checking whether the compiler supports Run-Time Type Identification... = yes checking whether the compiler implements namespaces... yes checking whether std::string::compare takes a string in argument 1... = yes checking whether the compiler has stringstream... yes checking whether the library defines class strstream... checking for = strstream ... yes yes configure: creating ./config.status config.status: creating Makefile config.status: creating cppunit.spec config.status: creating cppunit-config config.status: creating src/Makefile config.status: creating src/cppunit/Makefile config.status: creating include/Makefile config.status: creating include/cppunit/Makefile config.status: creating include/cppunit/extensions/Makefile config.status: creating include/cppunit/ui/Makefile config.status: creating include/cppunit/ui/mfc/Makefile config.status: creating include/cppunit/ui/qt/Makefile config.status: creating include/cppunit/ui/text/Makefile config.status: creating doc/Makefile config.status: creating doc/Doxyfile config.status: creating examples/Makefile config.status: creating examples/hierarchy/Makefile config.status: creating examples/cppunittest/Makefile config.status: creating config/config.h config.status: config/config.h is unchanged creating include/cppunit/config-auto.h - prefix CPPUNIT for = config/config.h de fines |
From: Baptiste L. <gai...@fr...> - 2002-08-27 18:33:19
|
Should be fixed now. I disabled the browse button while running tests. Baptiste. ----- Original Message ----- From: "Steffen Huebner" <ste...@we...> To: <cpp...@li...> Sent: Tuesday, August 27, 2002 4:26 PM Subject: [Cppunit-devel] Error in CppUnit 1.9.8 > Hi all, > > there seems to be a bug in the UserInterface (testrunner.dll) of CppUnit 1.9.8. > > On long running test cases (maybe caused by some sleeps for example) the "Run" button of the UI is blocked. > > The problem is, that the "Browse" button is not blocked while tests are running. To reproduce you have to start a long running TestSuite (use some sleeps). While the tests are executed please select a new test from the TreeHierarchyDialog. After selection the "run" button is enabled again. On activating the "run" button the whole application is getting blocked and is hanging up (need to be killed by task manager). > > I hope that this could be fixed with any following version. > > Best regards > > Steffen > > ____________________________________________________________________________ __ > WEB.DE MyPage - Ohne Computerkenntnisse in nur 5 Minuten online! Alles > inklusive! Kinderleicht! http://www.das.ist.aber.ne.lustige.sache.ms/ > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > |
From: Baptiste L. <gai...@fr...> - 2002-08-27 18:19:04
|
See FAQ item 2.2: http://cppunit.sourceforge.net/FAQ Baptiste. ----- Original Message ----- From: "André Dhondt" <ad...@gu...> To: <cpp...@li...>; <da...@re...> Sent: Tuesday, August 27, 2002 2:28 PM Subject: [Cppunit-devel] linker errors > CPPUnit developers: > > Sorry if this isn't the right forum for asking for support, but if it is, > could you please help??? > > I just downloaded ver. 1.8.0 of CppUnit, followed the directions for running > the HostApp examples, and everything worked fine. On a Win32 platform with > Visual C++ 6.0, I then attempted to use the TestRunner Gui (as per the > INSTALL-WIN32.txt instructions), but I get linker errors as follows: > > Linking... > msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall > std::basic_string<char,struct std::char_traits<char>,class > std::allocator<char> >::basic_string<char,struct > std::char_traits<char>,class std::allocator<char> >(class > basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::basic_string<char,struct std::char_traits<char>,class > std::allocator<char> > const &)" > (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@ > Z) already defined in Employ1Test.obj > > Since I'm a C++ newbie, I'd just like to know where I should be looking for > problems. Source code included below: > > file://__________________________Employ1Test.h_________________________ > #ifndef _EMPLOYTEST_H > #define _EMPLOYTEST_H > > #include <cppunit/TestCase.h> > #include <cppunit/extensions/HelperMacros.h> > > class Employ1Test : public CppUnit::TestCase > { > CPPUNIT_TEST_SUITE( Employ1Test ); > CPPUNIT_TEST( testCreateEmployee ); > CPPUNIT_TEST( testGetEmployeeName ); > CPPUNIT_TEST_SUITE_END(); > protected: > void testCreateEmployee( void ); > void testGetEmployeeName( void ); > }; > > > #endif // _EMPLOYTEST_H > > file://__________________________Employ1Test.cpp_________________________ > #include "Employ1Test.h" > #include "Employ1.h" > > CPPUNIT_TEST_SUITE_REGISTRATION( Employ1Test ); > > file://simply verifies the constuctors don't crash the app > void Employ1Test::testCreateEmployee( void ) > { > Employee *e1 = new Employee("Susan","Baker"); > Employee *e2 = new Employee("Robert","Jones"); > CPPUNIT_ASSERT( (int)e2->getCount == (int)2); > } > > file://verifies the constructors set the properties as expected, and that we can > retrieve the values > void Employ1Test::testGetEmployeeName( void ) > { > Employee *e1 = new Employee("Susan","Baker"); > Employee *e2 = new Employee("Robert","Jones"); > CPPUNIT_ASSERT( e1->getFirstName() == "Susan" ); > } > > file://__________________________Employ1.h_________________________ > #ifndef EMPLOY1_H > #define EMPLOY1_H > > class Employee > { > public: > Employee(const char*, const char*); file://constructor > ~Employee(); file://destructor > const char *getFirstName() const; > const char *getLastName() const; > > file://static member function > static int getCount(); > > private: > char *firstName; > char *lastName; > > file://static data member > static int count; > }; > > #endif > > file://__________________________Employ1.cpp_________________________ > #include <iostream> > > using std::cout; > using std::endl; > > #include <cstring> > #include <cassert> > #include "employ1.h" > > int Employee::count = 0; > > int Employee::getCount() {return count;} > > Employee::Employee(const char *first, const char *last) > { > firstName = new char[strlen(first) + 1]; > assert(firstName != 0); > strcpy(firstName, first); > > lastName = new char[strlen(last) + 1]; > assert(lastName != 0); > strcpy(lastName, last); > > ++count; > cout << "Employee constructor for " << firstName << > ' ' << lastName << " called." << endl; > > } > > Employee::~Employee() > { > cout << "~Employee() called for " << firstName << > ' ' << lastName << "." << endl; > delete [] firstName; > delete [] lastName; > --count; > } > > const char *Employee::getFirstName() const > { return firstName; } > > const char *Employee::getLastName() const > { return lastName; } > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > |