cppunit-devel Mailing List for CppUnit - C++ port of JUnit (Page 35)
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: Baptiste L. <gai...@fr...> - 2002-06-15 08:30:37
|
eq() is supposed (not defined anywhere) to be a float equal function using a given epsilon tolerance. It would likely work with == in the given context. Baptiste. ----- Original Message ----- From: Nelson Cysneros To: cpp...@li... Sent: Wednesday, May 29, 2002 8:50 PM Subject: [Cppunit-devel] Cookbook Question I apologize if this is a very obvious question but .. Regarding the following function of your CPPUnit Cook book: bool operator ==( const Complex &a, const Complex &b ) { return eq( a.real, b.real ) && eq( a.imaginary, b.imaginary ); } Where is eq defined? I have tried to locate a include file that contains that method, but it does not seem to exist. Is this a method we need to create? Best Regards, Nelson A. Cysneros Join Excite! - http://www.excite.com The most personalized portal on the Web! |
From: Baptiste L. <gai...@fr...> - 2002-06-13 17:45:55
|
----- Original Message ----- From: "Michel Armin" <Arm...@si...> To: "'Baptiste Lepilleur'" <gai...@fr...> Sent: Thursday, June 13, 2002 4:34 PM Subject: RE: [Cppunit-devel] DllPlugin > I attached a file that contains the previously mentioned corrections to the > documentation. Thanks, I reported the fix. > (At least I hope I corrected them - my English is not too good.) Well, it is imperative mode and I think the infitive form sholuld indeed be used in that case. So, my guess is that you indeed corrected them. Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/ |
From: Baptiste L. <gai...@fr...> - 2002-06-12 20:25:36
|
Please refer to CppUnit 1.9.6 documentation modules/Writing Test plug-in. Let me know of any short coming of the documentation (it's fairly recent). Be sure to use the last snapshop (1.9.6), as test plug-in have changed a lot. Baptiste. ----- Original Message ----- From: "Michel Armin" <Arm...@si...> To: "CppUnit-Devel (E-mail)" <cpp...@li...> Sent: Wednesday, June 12, 2002 3:52 PM Subject: [Cppunit-devel] DllPlugin > Hi. > > I am currently trying to understand the Plugin mechanism. But I don't > understand it quite well yet. > > What do I have to do to create my own plugin? > > Thanks > > Armin |
From: Baptiste L. <gai...@fr...> - 2002-06-12 16:45:01
|
No this functionnality is not available. You can only run one test at a time, but since you can run all the test of the suite that contains all the fixture's methods, you have something close to that functionnality. If this can not solve your problem, could you explain why ? Baptiste. ----- Original Message ----- From: Rinu Chacko To: cpp...@li... Sent: Tuesday, June 11, 2002 10:04 AM Subject: [Cppunit-devel] Queries about CPPUnit Hi, We tried CPP Unit. We had been using DUnit for a long time. In CPPUnit UI, there is no provision to select a set of the methods and execute. Is there any updated CPP Unit which provide this functionality (just like DUnit)? ( * Test cases selectable. * Different colors for Success/Failure/Exception etc. ) - Rinu Chacko |
From: Michel A. <Arm...@si...> - 2002-06-12 13:52:20
|
Hi. I am currently trying to understand the Plugin mechanism. But I don't understand it quite well yet. What do I have to do to create my own plugin? Thanks Armin |
From: Rinu C. <ri...@sm...> - 2002-06-11 08:02:57
|
Hi, We tried CPP Unit. We had been using DUnit for a long time. In CPPUnit = UI, there is no provision to select a set of the methods and execute. Is = there any updated CPP Unit which provide this functionality (just like = DUnit)? ( * Test cases selectable. * Different colors for Success/Failure/Exception=20 etc. ) - Rinu Chacko |
From: FUKUDA F. <ff...@nt...> - 2002-06-11 05:56:45
|
Hi all. I found a mistake on the document. HelperMacros.h: line 199 * CPPUNIT_TEST_EXCEPTION( testVEctorAtThrow, std::invalid_argument); line 205 v.at( 1 ); // must throw exception std::invalid_argument ^^^^^^^^^^^^^^^^^ ^^^^ it should be 'std::out_of_range' rather than 'std::bad_argument' -----:-----:-----:-----:-----:-----:-----:-----:-----:----- FUKUDA (episteme) Fumiki -- magical, but never a magic... |
From: Baptiste L. <gai...@fr...> - 2002-06-07 18:31:43
|
----- Original Message ----- From: "Loh, Choo Woon" <Cho...@au...> To: "'Baptiste Lepilleur '" <gai...@fr...> Sent: Tuesday, June 04, 2002 1:51 PM Subject: RE: [Cppunit-devel] CPPUnit Cookbook Bug > Hi there Baptiste, > Thanks for the quick response. For the bug, instead of > passing in the class itself as shown in the cookbook, it should have passed > in the test suite. > > Regarding the suggestion, it was not clear that I still had to add the test > methods to the suite (using CPPUNIT_TEST() macro) after calling > CPPUNIT_TEST_SUITE(). My example was actually incorrect. What I meant to > suggest was :- > > CPPUNIT_TEST_SUITE( ComplexNumberTest ); > CPPUNIT_TEST( testEquality ); > CPPUNIT_TEST( testAddition ); > CPPUNIT_TEST_SUITE_END(); This declare the test suite (behind the scene, it implements a static suite() method and add it test to the suite that is returned). At that point, the static suite() method is never called. > This works. However, I tried the following :- > > CPPUNIT_TEST_SUITE_REGISTRATION( ComplexNumberTest ); Check this 'define' documentation. It should only be used in the C++ file. It instantiates a static object, which uppon construction will add the suite returned by the static method suite() of the specified fixture to the test registry (more precisely, it will add a factory to instiate that suite). Baptiste. > CPPUNIT_TEST( testEquality ); > CPPUNIT_TEST( testAddition ); > CPPUNIT_TEST_SUITE_END(); > > which does not work. Did I do something wrong here ? > Thanks for any help. > > -----Original Message----- > From: Baptiste Lepilleur > To: Loh, Choo Woon; cpp...@li... > Sent: 1/06/02 21:21 > Subject: Re: [Cppunit-devel] CPPUnit Cookbook Bug > > ----- Original Message ----- > From: "Loh, Choo Woon" <Cho...@au...> > To: <cpp...@li...> > Sent: Thursday, May 30, 2002 7:15 AM > Subject: [Cppunit-devel] CPPUnit Cookbook Bug > > > > In the line, > > > > #include <cppunit/extensions/HelperMacros.h > > > CPPUNIT_TEST_SUITE_REGISTRATION( ComplexNumber ); > > > > Behind the scene, a static variable type of AutoRegisterSuite is > declared. > > On construction, it will register a TestSuiteFactory into the > > TestFactoryRegistry. The TestSuiteFactory returns the TestSuite > returned > by > > ComplexNumber::suite(). > > > > should be corrected as (highlighted in bold) :- > > > > #include <cppunit/extensions/HelperMacros.h > > > CPPUNIT_TEST_SUITE_REGISTRATION( ComplexNumberTest ); > > > > Behind the scene, a static variable type of AutoRegisterSuite is > declared. > > On construction, it will register a TestSuiteFactory into the > > TestFactoryRegistry. The TestSuiteFactory returns the TestSuite > returned > by > > ComplexNumberTest::suite(). > Fixed. > > > As a suggestion, you could improve the final example to use the other > helper > > macros as well :- > > > > CPPUNIT_TEST_SUITE_REGISTRATION( ComplexNumberTest ); > > CPPUNIT_TEST_SUITE( ComplexNumberTest ); > > CPPUNIT_TEST( testEquality ); > > CPPUNIT_TEST( testAddition ); > > CPPUNIT_TEST_SUITE_END(); > Could you explain in more details ? > > Baptiste. > --- > Baptiste Lepilleur <gai...@fr...> > http://gaiacrtn.free.fr/ > > |
From: Baptiste L. <gai...@fr...> - 2002-06-07 18:28:10
|
Can you explain what points are source of confusion ? You may also want to check out CppUnit 1.9.6 alternate cookbook = (provided with source). It not yet complete, but may help. http://cppunit.sourceforge.net/snapshot/ Baptiste. ----- Original Message -----=20 From: xprogram ming=20 To: cpp...@li...=20 Sent: Wednesday, June 05, 2002 4:56 PM Subject: [Cppunit-devel] Tutorial Please, is there any tutorial for the cppunit? The cookbook confuses me. I want to learn how to use the cppunit. Please reply. -------------------------------------------------------------------------= ----- Do You Yahoo!? Sign-up for Video Highlights of 2002 FIFA World Cup |
From: Baptiste L. <gai...@fr...> - 2002-06-07 18:27:47
|
I was about to suggest something among the same line: - on the server side, grab the root suite. Traversing the test hierarchy from the root suite, rebuild a hierarchy made of test proxy that can be called from the client (the Test::run() also need to transport the Exception that may be thrown). - on the client side, retrieve the test proxy root suite and pass it to the MFC test runner. I think that implementing this can be fairly simple: you 'only' need a generic implementation of the test proxy, one for the server side, and one for the client side, as well as transporting CppUnit::Exception information. Baptiste. ----- Original Message ----- From: "Gary Granger" <gr...@at...> To: <a_...@gm...> Cc: <cpp...@li...> Sent: Thursday, June 06, 2002 7:21 PM Subject: Re: [Cppunit-devel] distributed environment > > Hello Armin, > > I can suggest an alternative method of distributing the tests. I wanted to > run tests on a C++ application from the existing JUnit GUI, so I wrote a > CORBA IDL for some of the CppUnit interfaces. This was relatively easy to > do because the interfaces were simple and well-defined. Then I added CORBA > implementations for Tests and TestCases to the CppUnit library which serve > as proxies for the actual Tests and TestCases in the C++ test application. > So any Tests written using the existing CppUnit library could also be > called remotely through CORBA. This method avoids serialization, the front > and back ends could be completely different architectures, different > languages, and you could choose between the MFC GUI and the Java GUI. It > was especially convenient for Java since CORBA is readily available, but I > think a C++ front-end would also be possible. > > You can grab the source for my modified CppUnit and some simple READMEs > from the UnixCppUnit section of my home page: > > http://www.atd.ucar.edu/~granger > > The modifications were based on an older version of CppUnit, but perhaps > the example will still be useful to you. > > gary > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > |
From: Philippe L. <phi...@ca...> - 2002-06-07 16:21:15
|
Hi, I'm wondering if anyone as started on writing an XML syntax to generate = tests. For instance, I have a method that I want to call. It has 4 parameters. Each of those = has valid ranges. I want to be sure that the method generates the proper = error messages and proper outputs. So I could do 10 test methods or do a single general method which takes = 4 inputs and returns one value. I would just have to generate an = appropriate return string based on the errors encountered inside the = call to the test function.=20 Then I could have a test generator that either parses the XML to = generate a C++ class that gets compiled into the test suite (probably = the more portable solution, even if more awkward to use). Or I have a = generator that dynamically reads and create those test functions. Now, has anyone worked on something like this ? The above is already = available from JUnit but I didn't see any mentions of a cppunit = extension that would allow me to do this. Hopefully I just missed it :) Phil PS, The format would be <testCase name=3D"CreateMember"> <inputs> <input name=3D"Login"/> <input name=3D"FirstName"/> <input name=3D"LastName"/> <input name=3D"Password"/> </inputs> <tests> <test> <Login></Login> <FirstName>John</FirstName> <LastName>Smith</LastName> <Password></Password> <result>Login Invalid</result> </test> <test> <Login>John</Login> <FirstName>John</FirstName> <LastName>Smith</LastName> <Password>John</Password> <result>Password same as Login</result> </test> =20 <test> <Login>John</Login> <FirstName>John</FirstName> = <LastName>SmithXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</= LastName> <Password>abbaaaba</Password> <result>LastName too long</result> </test> <test> <Login>john</Login> <FirstName>John</FirstName> <LastName>Smith</LastName> <Password>Bob</Password> <result>Ok</result> </test> </tests> </testCase> |
From: Gary G. <gr...@at...> - 2002-06-06 17:21:25
|
Hello Armin, I can suggest an alternative method of distributing the tests. I wanted to run tests on a C++ application from the existing JUnit GUI, so I wrote a CORBA IDL for some of the CppUnit interfaces. This was relatively easy to do because the interfaces were simple and well-defined. Then I added CORBA implementations for Tests and TestCases to the CppUnit library which serve as proxies for the actual Tests and TestCases in the C++ test application. So any Tests written using the existing CppUnit library could also be called remotely through CORBA. This method avoids serialization, the front and back ends could be completely different architectures, different languages, and you could choose between the MFC GUI and the Java GUI. It was especially convenient for Java since CORBA is readily available, but I think a C++ front-end would also be possible. You can grab the source for my modified CppUnit and some simple READMEs from the UnixCppUnit section of my home page: http://www.atd.ucar.edu/~granger The modifications were based on an older version of CppUnit, but perhaps the example will still be useful to you. gary |
From: Michel A. <Arm...@si...> - 2002-06-06 07:41:33
|
Hi all. Motivation: I am planning to use CppUnit in a typical client/server scenario, where some of the TestCases have to be performed in Backend (BE). Since the results etc. have to be displayed in the Client/Frontend (FE) of course, I have to transfer data from BE to FE. Because I want to take advantage of the already existing CppUnit-MFC-dialog, I thought it would be pretty nice if we could add a kind of serialization support to at least some of the CppUnit classes. Approach/Solution: In fact, it would be enough if all the classes would be "serializable" that are used for notifying the TestResult. A TestResult object (living in BE) in turn would notify a special observer which would then transmit these information to FE where it can be distributed to the "ordinary" TestListener. Using this approach it should be possible to have a BE/FE separation which is completely transparent to the rest of the system (e.g. progress bar in the dialog etc.). And because of this transparence it would still be possible to use any kind of TestListener in FE, which I think is very important with respect to exensibility. Implementation: Since the exact format of "transferable" objects is quite dependent on the environment, I would suggest to use an iostream based approach. Being a Java-Programmer, the following idea comes to my mind: class Exception { Exception(istream& is); // ... public: void writeObject(ostream& os); void readObject(istream& is); }; Exception::Exception(istream& is) { readObject(is); } Exception::writeObject(ostream& os) { os << state1 << " " << state2; } Exception::readObject(istream& is) { is >> state1 >> state2; } Suggestions: What are you thinking about this topic? Do you know a more C++ like way to do the serialization? Or some completely different approach? Regards Armin (bored) Michel |
From: xprogram m. <pro...@ya...> - 2002-06-05 14:59:26
|
Please, is there any tutorial for the cppunit? The cookbook confuses me. I want to learn how to use the cppunit. Please reply. --------------------------------- Do You Yahoo!? Sign-up for Video Highlights of 2002 FIFA World Cup |
From: Stanley S. <su...@t-...> - 2002-06-03 13:13:08
|
For clean_list on Solaris, Forte6, all template instantiations are in a = subdirectory SunWS_cache, in subdirectories based on the first letter of = the mangled template name. I think Template.DB worked for 4.2, but it = won't for 5.1 and higher. I'm not sure about 5, since I don't have a = 5.0 available. I think we'll be evaluating Forte 7 in July, I'll let = you know if there are major chainges. -----Original Message----- From: Baptiste Lepilleur [mailto:gai...@fr...] Sent: Sat 01-Jun-02 06:28 To: bo...@it... Cc: cpp...@li... Subject: Re: [Cppunit-devel] Building cppunit for Sun 5.0 and 6.0 = compilers I've added the following to install-unix. Let me know if it is enough: Solaris/Sun 6.0 compiler ------------------------ Sun 6.0 compiler requires the "-pta -instances=3Dstatic" options. 'make check' has been reported to fail to build, but 'make install' = works. ----- Original Message -----=20 From: Magne Borg=20 To: 'Lavoie Philippe' ; 'David Marcombes'=20 Cc: cpp...@li...=20 Sent: Friday, May 24, 2002 6:06 PM Subject: RE: [Cppunit-devel] Building cppunit for Sun 5.0 and 6.0 = compilers Thank you all for the helpful information. =20 I was able to build cppunit for Sun 6.0 by adding the -pta and = -instances=3Dstatic options. However, when I do a "make check" it starts printing "Output line too = long." and I have to kill it after a while. But after doing a "make install" I am able to use the cppunit library, = so it seems like it was able to build fine. =20 Cppunit will not work with Sun 5.0 because Sun 5.0 doesn't support = member templates. =20 Thanks, Magne -----Original Message----- From: Lavoie Philippe [mailto:la...@yu...] Sent: Friday, May 24, 2002 7:54 AM To: David Marcombes Cc: bo...@it...; cpp...@li... Subject: Re: [Cppunit-devel] Building cppunit for Sun 5.0 and 6.0 = compilers David Marcombes wrote: Magne, I do think 6.0 supports templates You might want to try use different options for CC, I've seen this = kind of problem before. There is on option -instances ( extern static = global ) Give it a try it might help. In a project I also had to use = -pta ( equivalent to -template=3Dwholeclass ). I do remember what was the exact combination, hopefully it will = trigger some memories here. Hope it Helps David M. I concur with David, I checked my old configuration files and I have = something like the following inside the configure.in if test "$CXX" =3D CC; then case "$target_os" in solaris*) CXXFLAGS=3D$CXXFLAGS" -pta" complex_lib=3D"-lcomplex" clean_list=3D"-r Templates.DB" ;; irix*) CXXFLAGS=3D$CXXFLAGS" -pta -n32 -64" complex_lib=3D"-lcomplex" clean_list=3D"-r Templates.DB ii_files" ;; esac The -pta is pretty much required when you generate a library.=20 Phil |
From: Dave D. <da...@dr...> - 2002-06-02 15:20:53
|
On Sat, Jun 01, 2002 at 01:05:17PM +0200, Baptiste Lepilleur wrote: > From the stack trace, it seems that > TestAssert.h:46 > static std::string toString( const T& x ) > { > OStringStream ost; > ost << x; > return ost.str(); // << throw an exception... > } > > Could you: > - dump the exception Sorry for my ignorance, but how do you do that? :) I tried doing this: void Suite2::test_case1() { try { string a = "2a"; string b = "2b"; CHECK_EQUALS(a, b); } catch(std::exception & e) { cerr << "Caught exception: " << e.what() << endl; } } But a SIGABRT still happens in CHECK_EQUALS() and the catch block never runs. > - tell me what are the value of > CPPUNIT_HAVE_SSTREAM > CPPUNIT_HAVE_CLASS_STRSTREAM > CPPUNIT_HAVE_STRSTREAM > in the generated config file cppunit/config-auto.h. #define CPPUNIT_HAVE_SSTREAM 1 #define CPPUNIT_HAVE_CLASS_STRSTREAM 1 #define CPPUNIT_HAVE_STRSTREAM 1 > The problem is likely an OStringStream issue that depend on your > configuration. If I remember ostringstream's weren't in GCC 2.95. But Red Hat's 2.96 is a bastard child somewhere between 2.95 and 3.0.x. -Dave |
From: Baptiste L. <gai...@fr...> - 2002-06-01 11:39:05
|
I've added the following to install-unix. Let me know if it is enough: Solaris/Sun 6.0 compiler ------------------------ Sun 6.0 compiler requires the "-pta -instances=3Dstatic" options. 'make check' has been reported to fail to build, but 'make install' = works. ----- Original Message -----=20 From: Magne Borg=20 To: 'Lavoie Philippe' ; 'David Marcombes'=20 Cc: cpp...@li...=20 Sent: Friday, May 24, 2002 6:06 PM Subject: RE: [Cppunit-devel] Building cppunit for Sun 5.0 and 6.0 = compilers Thank you all for the helpful information. =20 I was able to build cppunit for Sun 6.0 by adding the -pta and = -instances=3Dstatic options. However, when I do a "make check" it starts printing "Output line too = long." and I have to kill it after a while. But after doing a "make install" I am able to use the cppunit library, = so it seems like it was able to build fine. =20 Cppunit will not work with Sun 5.0 because Sun 5.0 doesn't support = member templates. =20 Thanks, Magne -----Original Message----- From: Lavoie Philippe [mailto:la...@yu...] Sent: Friday, May 24, 2002 7:54 AM To: David Marcombes Cc: bo...@it...; cpp...@li... Subject: Re: [Cppunit-devel] Building cppunit for Sun 5.0 and 6.0 = compilers David Marcombes wrote: Magne, I do think 6.0 supports templates You might want to try use different options for CC, I've seen this = kind of problem before. There is on option -instances ( extern static = global ) Give it a try it might help. In a project I also had to use = -pta ( equivalent to -template=3Dwholeclass ). I do remember what was the exact combination, hopefully it will = trigger some memories here. Hope it Helps David M. I concur with David, I checked my old configuration files and I have = something like the following inside the configure.in if test "$CXX" =3D CC; then case "$target_os" in solaris*) CXXFLAGS=3D$CXXFLAGS" -pta" complex_lib=3D"-lcomplex" clean_list=3D"-r Templates.DB" ;; irix*) CXXFLAGS=3D$CXXFLAGS" -pta -n32 -64" complex_lib=3D"-lcomplex" clean_list=3D"-r Templates.DB ii_files" ;; esac The -pta is pretty much required when you generate a library.=20 Phil |
From: Baptiste L. <gai...@fr...> - 2002-06-01 11:39:01
|
From the stack trace, it seems that TestAssert.h:46 static std::string toString( const T& x ) { OStringStream ost; ost << x; return ost.str(); // << throw an exception... } Could you: - dump the exception - tell me what are the value of CPPUNIT_HAVE_SSTREAM CPPUNIT_HAVE_CLASS_STRSTREAM CPPUNIT_HAVE_STRSTREAM in the generated config file cppunit/config-auto.h. The problem is likely an OStringStream issue that depend on your configuration. Baptiste. ----- Original Message ----- From: "Dave Dribin" <da...@dr...> To: <cpp...@li...> Sent: Friday, May 31, 2002 2:31 AM Subject: [Cppunit-devel] Core dump using CPPUNIT_ASSERT_EQUAL on strings > Hello, > > I've come across a core dump while using CPPUNIT_ASSERT_EQUAL on > strings. I've attached a tarball with a few source files and a README > explaining how to reproduce it. I've attached the README, too. > > Note: I am not subscribed to the list, so please CC me on any replies. > > -Dave > |
From: Baptiste L. <gai...@fr...> - 2002-06-01 11:39:01
|
----- Original Message ----- From: "Loh, Choo Woon" <Cho...@au...> To: <cpp...@li...> Sent: Thursday, May 30, 2002 7:15 AM Subject: [Cppunit-devel] CPPUnit Cookbook Bug > In the line, > > #include <cppunit/extensions/HelperMacros.h > > CPPUNIT_TEST_SUITE_REGISTRATION( ComplexNumber ); > > Behind the scene, a static variable type of AutoRegisterSuite is declared. > On construction, it will register a TestSuiteFactory into the > TestFactoryRegistry. The TestSuiteFactory returns the TestSuite returned by > ComplexNumber::suite(). > > should be corrected as (highlighted in bold) :- > > #include <cppunit/extensions/HelperMacros.h > > CPPUNIT_TEST_SUITE_REGISTRATION( ComplexNumberTest ); > > Behind the scene, a static variable type of AutoRegisterSuite is declared. > On construction, it will register a TestSuiteFactory into the > TestFactoryRegistry. The TestSuiteFactory returns the TestSuite returned by > ComplexNumberTest::suite(). Fixed. > As a suggestion, you could improve the final example to use the other helper > macros as well :- > > CPPUNIT_TEST_SUITE_REGISTRATION( ComplexNumberTest ); > CPPUNIT_TEST_SUITE( ComplexNumberTest ); > CPPUNIT_TEST( testEquality ); > CPPUNIT_TEST( testAddition ); > CPPUNIT_TEST_SUITE_END(); Could you explain in more details ? Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/ |
From: Dave D. <da...@dr...> - 2002-05-31 00:31:50
|
Hello, I've come across a core dump while using CPPUNIT_ASSERT_EQUAL on strings. I've attached a tarball with a few source files and a README explaining how to reproduce it. I've attached the README, too. Note: I am not subscribed to the list, so please CC me on any replies. -Dave |
From: Nelson A. C. <cys...@sp...> - 2002-05-30 15:02:15
|
I apologize if this is a very obvious question but .. Regarding the following function of your CPPUnit Cook book: bool operator ==( const Complex &a, const Complex &b ) { return eq( a.real, b.real ) && eq( a.imaginary, b.imaginary ); } Where is eq defined? I have tried to locate a include file that contains that method, but it does not seem to exist. Is this a method we need to create? Best Regards, Nelson Albert Cysneros |
From: Loh, C. W. <Cho...@au...> - 2002-05-30 05:16:04
|
In the line, #include <cppunit/extensions/HelperMacros.h > CPPUNIT_TEST_SUITE_REGISTRATION( ComplexNumber ); Behind the scene, a static variable type of AutoRegisterSuite is declared. On construction, it will register a TestSuiteFactory into the TestFactoryRegistry. The TestSuiteFactory returns the TestSuite returned by ComplexNumber::suite(). should be corrected as (highlighted in bold) :- #include <cppunit/extensions/HelperMacros.h > CPPUNIT_TEST_SUITE_REGISTRATION( ComplexNumberTest ); Behind the scene, a static variable type of AutoRegisterSuite is declared. On construction, it will register a TestSuiteFactory into the TestFactoryRegistry. The TestSuiteFactory returns the TestSuite returned by ComplexNumberTest::suite(). As a suggestion, you could improve the final example to use the other helper macros as well :- CPPUNIT_TEST_SUITE_REGISTRATION( ComplexNumberTest ); CPPUNIT_TEST_SUITE( ComplexNumberTest ); CPPUNIT_TEST( testEquality ); CPPUNIT_TEST( testAddition ); CPPUNIT_TEST_SUITE_END(); Cheers, Choo ACUS UNISYS Sydney, Australia Phone +61-2-9736-5524 Fax +61-2-9736-5600 NET2 780 5524 Internet mail address Cho...@au... |
From: Nelson C. <nel...@ex...> - 2002-05-29 18:50:49
|
I apologize if this is a very obvious question but . |
From: Tredinnick, J. <jac...@me...> - 2002-05-27 17:28:10
|
Hi all, I'm not sure if anyone has come across this, but here goes ... I thought it would be a good idea to save a bit of time by using the Orthodox class, however I was surprised to see that operator! was required to use this? Personally, I hardly ever write a class with operator!, but quite often have the rest of the stuff in the Orthodox::runTest() - in fact I usually don't bother with operator!= either. Anyway, I ended up writing some global methods in Orthodox.h that concentrate more on =, == and <. Please find these in the attached file. This time, the client has to specify three non-default class objects a<b<c. The test goes some way towards checking for "total ordering" with operator<. E.g. that a < c and such, - which you need for associative STL containers, unless you specify a comparator. Please add it somewhere sensible if you think it'll be useful (BTW - I also have a TestCase for this, written for my slightly hacked version of 1.7.2 - let me know if you want this too). Regards -- Jake <<ortodoxTests.h>> |
From: <hh...@un...> - 2002-05-24 18:41:46
|
Hello, Please write a tutorial for the cppunit. I want to use it, but I have a hard time learning how to use the cppunit tool. I search the internet, but I could not find a tutorial. So please write a cppunit tutorial. Sincerely cppunit fan, Wayne |