Re: [Cppunit-devel] templatized assertions
Brought to you by:
blep
From: Baptiste L. <bl...@cl...> - 2001-05-17 19:29:18
|
> > If you look at the source you have: > > /** A set of macros which allow us to get the line number > > * and file name at the point of an error. > > * Just goes to show that preprocessors do have some > > * redeeming qualities. > > */ > > #define CPPUNIT_SOURCEANNOTATION > > > > #ifdef CPPUNIT_SOURCEANNOTATION > > ... > > > > Which means if you removed the define, you must use the implementation > > (TestAssert). > > Read a bit further; there is an #else clause! This symbol is used to > choose between two different implementations of the assert macro. In > both cases, you have a macro named "assert". Sorry. I wrote this from memory and it seems it's pretty messed up (that what you get when you're playing with 3 differents versions of cppunit ;-(. ) Is CPPUNIT_SOURCEANNOTATION really required ? The only reason I can see for it would be that some weird compiler does not support the __FILE__ & __LINE__ macros. Have anobody hear of something like that ? 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). |