Re: [Cppunit-devel] ch-ch-ch-changes ...
Brought to you by:
blep
From: Steve M. R. <ste...@vi...> - 2001-05-29 19:47:22
|
On Tue, May 29, 2001 at 12:03:15PM -0700, Townsend, Guy wrote: > > > > -----Original Message----- > > From: Steve M. Robbins > > Since there are already CU_-prefixed macros, I'm planning > > to use CU_assert unless I hear a better suggestion. > > I already mentioned it, but just to reiterate it here, I ask the question > whether macros shoudn't be all caps? It is true that macros have a long history of being all caps. I hereby amend my post of yesterday to read "I'm planning to convert to CU_ASSERT unless I hear a better suggestion". > > I'm also planning to make a backwards-compatibility configure switch > > to enable the current "assert()" macro. My natural inclination is to > > discourage the use of naked assert() by disabling it in the default > > build (i.e. if the switch is NOT given). However, that's a bit > > obnoxious if CppUnit has a long history of using the naked assert(). > > What is the general feeling about this? > > My personal feeling is that since it conflicts with a standard C++ library > macro the original inclusion should be treated as a bug, and it should be > "fixed" (by making it NOT the default behavior). There absolutely needs to > be mention of it in release notes and in the header file. But I think it's > time to bite the bullet and make the change. Reminds me of the XP process: > When code is found to be wrong, just fix it. make whatever adjustments are > necessary, and move on. Never to be bothered by that ugliness again. > > Sure, there should be a way to turn the switch on at a project level, but > that is a small change to a makefile after discovering that assert() is > undefined. That suggests to not even bother with a configure-time switch that would enable the old macros. Rather, they would be protected using something like #if CU_ENABLE_NAKED_ASSERT # define assert(c) CU_ASSERT(c) ... #endif Not a bad idea... > Steve, I certainly appreciate your contributions to the project. I haven't > had time to any actual code contribution yet, but I sure appreciate those > who are doing so. Thanks. I appreciate the constructive feedback. It is critical for those using (or planning to use) CppUnit to speak up *now*. Namespace decisions, and the like are going to haunt us forever if we get them wrong. -Steve -- 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 |