Thread: RE: [Cppunit-devel] Change done...
Brought to you by:
blep
From: Townsend, G. <gto...@sh...> - 2001-06-11 22:54:58
|
That "operator !()" in OrthodoxTest test has always bothered me. It's okay for a very few classes, but just doesn't apply for most of the classes I write. Which makes OrthodoxTest not very useful. Parts of it are good, but the negation of most classes doesn't seem to make sense. Perhaps that part should be at least #ifdef'd out unless one really wants to use it for an appropriate class? Guy > -----Original Message----- > From: Steve M. Robbins [mailto:ste...@vi...] > Sent: Monday, June 11, 2001 3:09 PM > To: cpp...@li... > Subject: Re: [Cppunit-devel] Change done... > > > On Mon, Jun 11, 2001 at 10:25:46PM +0200, Baptiste Lepilleur wrote: > > Well, I finally comitted the thing. I checkout the project > and it compiled > > fine, so everything should be there (a lot of files have > been added). > > After some fine-tuning, I got it compiled under unix, with one > exception. > > > > You should have exactly 80 unit tests running in cppunittests, > > I couldn't get examples/cppunit/OrthodoxTest.cpp to compile, and > I couldn't figure out how to fix it. Specifically, I don't understand > what is intended by all the "operator !()" functions. They are > declared to return an object of class "Value", but in each case > the return statement is computing an integer. > > After omitting OrthodoxTest, I got 72 tests which all passed. > > > -S > > > -- > by Rocket to the Moon, > by Airplane to the Rocket, > by Taxi to the Airport, > by Frontdoor to the Taxi, > by throwing back the blanket and laying down the legs ... > - They Might Be Giants > > > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > http://lists.sourceforge.net/lists/listinfo/cppunit-devel > |
From: Bastiaan B. <bas...@li...> - 2001-06-12 07:31:24
|
> -----Oorspronkelijk bericht----- > Van: Baptiste Lepilleur [mailto:bl...@cl...] > Verzonden: Tuesday, June 12, 2001 9:20 AM > Aan: cpp...@li... > Onderwerp: Re: [Cppunit-devel] Change done... > --8<-- > Is there a place where those STL concepts can be look up > (my knowledge > is empirical)? > The June 2001 issue of Dr. Dobbs contains an article on C++ concept checking. They refer to the Boost Concept Checking Library: http://www.boost.org/libs/concept_check/concept_check.htm. Seems interesting. Of course the descriptions of the STL concepts themselves can be found at SGI's STL pages: http://www.sgi.com/tech/stl/ Good luck, Bastiaan > Baptiste. > > --- > Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Author of The Text Reformatter, a tool for fanfiction readers and writers. Language: English, French (Well, I'm French). _______________________________________________ Cppunit-devel mailing list Cpp...@li... http://lists.sourceforge.net/lists/listinfo/cppunit-devel |
From: Baptiste L. <gai...@fr...> - 2001-06-12 11:44:44
|
Quoting Bastiaan Bakker <bas...@li...>: > > > > -----Oorspronkelijk bericht----- > > Van: Baptiste Lepilleur [mailto:bl...@cl...] > > Verzonden: Tuesday, June 12, 2001 9:20 AM > > Aan: cpp...@li... > > Onderwerp: Re: [Cppunit-devel] Change done... > > Is there a place where those STL concepts can be look up > > (my knowledge > > is empirical)? > > The June 2001 issue of Dr. Dobbs contains an article on C++ concept > checking. They refer to the Boost Concept Checking Library: > http://www.boost.org/libs/concept_check/concept_check.htm. Seems > interesting. Thanks. I knew about the boost library concept checking but never got farther than the introduction. I took the time to read a bit more and came to the following conclusion: Concept check can be added transparently to existing code. Can someone with some experience with the boost library confirm that ? For us, it would mean that we could go ahead and implements the unit test for those concepts, and later add compile time concept checking (some option to use boost?). First concept I'd like to add would be Assignable and CopyConstructible (I'm refering to boost concept which are more fine grained: http://www.boost.org/libs/concept_check/reference.htm ). Those are used for example in the unit tests for Exception and NotEqualException (they did reaveal some bugs...). The difficulty for us is that you need to specify how you compare two instances (for example, with Exception, I compare the result of what() for each instance). You also need to specify one or more instance that are used for the tests. I'm not sure of how do to that. I was thinking of using functors or something like that. Any ideas ? I would like the final form to be able to mesh well with existing macros, so you could simply add a few macro to check the concepts. > Of course the descriptions of the STL concepts themselves can be found > at > SGI's STL pages: http://www.sgi.com/tech/stl/ Thanks, this doc is really good. > > Good luck, > > Bastiaan --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Language: English, French |
From: Steve M. R. <ste...@vi...> - 2001-06-12 00:29:56
|
On Mon, Jun 11, 2001 at 03:50:26PM -0700, Townsend, Guy wrote: > That "operator !()" in OrthodoxTest test has always bothered me. It's okay > for a very few classes, but just doesn't apply for most of the classes I > write. Which makes OrthodoxTest not very useful. Parts of it are good, but > the negation of most classes doesn't seem to make sense. Perhaps that part > should be at least #ifdef'd out unless one really wants to use it for an > appropriate class? Another random thought: rather than "orthodox", perhaps it makes more sense to template unit tests for STL concepts like Assignable, EqualityComparable, DefaultConstructible, and whatnot. -- by Rocket to the Moon, by Airplane to the Rocket, by Taxi to the Airport, by Frontdoor to the Taxi, by throwing back the blanket and laying down the legs ... - They Might Be Giants |
From: Baptiste L. <bl...@cl...> - 2001-06-12 07:03:18
|
----- Original Message ----- From: "Steve M. Robbins" <ste...@vi...> To: <cpp...@li...> Sent: Tuesday, June 12, 2001 2:29 AM Subject: Re: [Cppunit-devel] Change done... > On Mon, Jun 11, 2001 at 03:50:26PM -0700, Townsend, Guy wrote: > > That "operator !()" in OrthodoxTest test has always bothered me. It's okay > > for a very few classes, but just doesn't apply for most of the classes I > > write. Which makes OrthodoxTest not very useful. Parts of it are good, but > > the negation of most classes doesn't seem to make sense. Perhaps that part > > should be at least #ifdef'd out unless one really wants to use it for an > > appropriate class? > > Another random thought: rather than "orthodox", perhaps it makes more > sense to template unit tests for STL concepts like Assignable, > EqualityComparable, DefaultConstructible, and whatnot. Yes that would make a lot of sense (look at the TODO file ;-) ). The current Orthodox test is not very usable because you need to look up the code to know which assertion failed. It would be better if we had more fine grained test which name would make sense. We could then compose those test for common "concept". Is there a place where those STL concepts can be look up (my knowledge is empirical)? Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Author of The Text Reformatter, a tool for fanfiction readers and writers. Language: English, French (Well, I'm French). |
From: Baptiste L. <bl...@cl...> - 2001-06-12 07:05:33
|
----- Original Message ----- From: "Townsend, Guy" <gto...@sh...> To: <cpp...@li...> Sent: Tuesday, June 12, 2001 12:50 AM Subject: RE: [Cppunit-devel] Change done... > That "operator !()" in OrthodoxTest test has always bothered me. It's okay > for a very few classes, but just doesn't apply for most of the classes I > write. Which makes OrthodoxTest not very useful. Parts of it are good, but > the negation of most classes doesn't seem to make sense. Perhaps that part > should be at least #ifdef'd out unless one really wants to use it for an > appropriate class? > > Guy #ifdef would be bad, because depending of the project you would be reading, the semantic would change. > > > > -----Original Message----- > > From: Steve M. Robbins [mailto:ste...@vi...] > > Sent: Monday, June 11, 2001 3:09 PM > > To: cpp...@li... > > Subject: Re: [Cppunit-devel] Change done... > > > > > > On Mon, Jun 11, 2001 at 10:25:46PM +0200, Baptiste Lepilleur wrote: > > > Well, I finally comitted the thing. I checkout the project > > and it compiled > > > fine, so everything should be there (a lot of files have > > been added). > > > > After some fine-tuning, I got it compiled under unix, with one > > exception. > > > > > > > You should have exactly 80 unit tests running in cppunittests, > > > > I couldn't get examples/cppunit/OrthodoxTest.cpp to compile, and > > I couldn't figure out how to fix it. Specifically, I don't understand > > what is intended by all the "operator !()" functions. They are > > declared to return an object of class "Value", but in each case > > the return statement is computing an integer. > > > > After omitting OrthodoxTest, I got 72 tests which all passed. > > > > > > -S > > > > > > -- > > by Rocket to the Moon, > > by Airplane to the Rocket, > > by Taxi to the Airport, > > by Frontdoor to the Taxi, > > by throwing back the blanket and laying down the legs ... > > - They Might Be Giants > > > > > > _______________________________________________ > > Cppunit-devel mailing list > > Cpp...@li... > > http://lists.sourceforge.net/lists/listinfo/cppunit-devel > > > > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > http://lists.sourceforge.net/lists/listinfo/cppunit-devel > |