Re: [Cppunit-devel] templatized assertions
Brought to you by:
blep
From: Steve M. R. <ste...@vi...> - 2001-05-17 16:50:18
|
On Thu, May 17, 2001 at 06:35:02PM +0200, Baptiste Lepilleur wrote: > Quoting "Steve M. Robbins" <ste...@vi...>: > > ... unless folks are using the class functions CppUnit::TestAssert:: > > TestImplementation(), etc directly. Do you? What is the advantage of > > doing that? > See Dolores Scott mail. I only have very few idea why someone would not rely > on the assert: > 1) Somewhere there are some include of C assert, which override our assert > macro... I'm still trying to find a work around that one. Suggestions are > welcome. True. The only fix that comes to mind is for CppUnit to use a different macro name. > > I don't understand what you mean by "disabled the assert macro". I > > don't see a > > way for doing that. Are you referring to folks directly using the > > TestAssert > > member functions? > > 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". -- 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 |