RE: [Cppunit-devel] ch-ch-ch-changes ...
Brought to you by:
blep
From: Bastiaan B. <bas...@li...> - 2001-05-30 17:41:42
|
-----Oorspronkelijk bericht----- Van: Steve M. Robbins [mailto:ste...@vi...] Verzonden: Tuesday, May 29, 2001 9:47 PM Aan: cpp...@li... Onderwerp: Re: [Cppunit-devel] ch-ch-ch-changes ... 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". Sofar I've not payed very much attention to the macro prefixes yet, but I would like to suggest we go for the slightly longer 'CPPUNIT' prefix: It's more in line with the CppUnit namespace we already claim and the header guard defines. CU may be too short to avoid naming collisions with other libraries, especially because of the phonetic 'see you' association. > > 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... Yes, go for it. Let's get rid of this rude assert define asap. > 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. Or at least until version 2 :-) BTW this makes me very curious about how many people are using CppUnit in a production environment. So far I haven't been concerned too much about backward compatibility, because the 1.5.3 release was broken. But I may be wrong? Bastiaan -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 _______________________________________________ Cppunit-devel mailing list Cpp...@li... http://lists.sourceforge.net/lists/listinfo/cppunit-devel |