Thread: [Cppunit-devel] config.h changes committed
Brought to you by:
blep
From: Bastiaan B. <bas...@li...> - 2001-06-17 20:09:39
|
Hi, I finally comitted the config.h changes I proposed last week. They have some consequences: * use autoconf 2.40 or higher to rebuild aclocal.m4, because the AC_CREATE_PREFIX_CONFIG_H macro needs the AS_DIRNAME macro. * don't HAVE_BLA, etc. macro's anymore, use CPPUNIT_HAVE_BLA instead. * include <cppunit/Portability.h> instead of <cppunit/config.h> * don't use platform specific macros (i.e. _MSC_VER) in common source code anymore. Instead 'fix' it in Portability.h or create a CPPUNIT_ macro descibing the non portable feature. * if you add a test to ./configure.in add the corressponding #define to cppunit/config-msvc6.h and cppnuit/config-bcb5.h. I you don't know the correct value for these platforms add and #error with some useful info for the platform maintainer. Cheers, Bastiaan |
From: Steve M. R. <ste...@vi...> - 2001-06-17 22:35:37
|
On Sun, Jun 17, 2001 at 10:20:16PM +0200, Bastiaan Bakker wrote: > I finally comitted the config.h changes I proposed last week. Yay! > * use autoconf 2.40 or higher to rebuild aclocal.m4, because the > AC_CREATE_PREFIX_CONFIG_H macro needs the AS_DIRNAME macro. I expect you meant "2.50" ? > * include <cppunit/Portability.h> instead of <cppunit/config.h> Okay, but ... did you neglect to cvs add Portability.h? [And config-xxx.h?] -- 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: Bastiaan B. <bas...@li...> - 2001-06-17 23:06:20
|
"Steve M. Robbins" wrote: > On Sun, Jun 17, 2001 at 10:20:16PM +0200, Bastiaan Bakker wrote: > > > I finally comitted the config.h changes I proposed last week. > > Yay! > > > * use autoconf 2.40 or higher to rebuild aclocal.m4, because the > > AC_CREATE_PREFIX_CONFIG_H macro needs the AS_DIRNAME macro. > > I expect you meant "2.50" ? The docs somewhere stated that AS_DIRNAME has been included in 2.40. Don't know whether that's a public release or not, or that it was a typo. I'm using 2.50 myself. > > > > > * include <cppunit/Portability.h> instead of <cppunit/config.h> > > Okay, but ... did you neglect to cvs add Portability.h? > [And config-xxx.h?] > :-( Yes, I forgot to commit them, grr. They've been added now. Thanks, Bastiaan |
From: Steve M. R. <ste...@vi...> - 2001-06-18 02:29:27
|
On Mon, Jun 18, 2001 at 01:17:03AM +0200, Bastiaan Bakker wrote: > "Steve M. Robbins" wrote: > > > On Sun, Jun 17, 2001 at 10:20:16PM +0200, Bastiaan Bakker wrote: > > > * use autoconf 2.40 or higher to rebuild aclocal.m4, because the > > > AC_CREATE_PREFIX_CONFIG_H macro needs the AS_DIRNAME macro. > > > > I expect you meant "2.50" ? > > The docs somewhere stated that AS_DIRNAME has been included in 2.40. > Don't know whether that's a public release or not, or that it was a > typo. I'm using 2.50 myself. Interesting. There was no public 2.40, certainly. In fact, there is no mention of 2.40 anywhere in the autoconf NEWS or ChangeLog files that I can find. > > > * include <cppunit/Portability.h> instead of <cppunit/config.h> Looks good. About Portability.h, I have three questions. 1. Shouldn't this bit go into config-msvc6.h? #if _MSC_VER > 1000 // VC++ #pragma once #pragma ... 2. Which way should the "naked assert" default? I thought the consensus was to NOT define assert() by default. However, Portability.h enables them by default. More importantly, the header introduces an extra symbol, which I think is unnecessary. We could write it as #ifndef CPPUNIT_ENABLE_NAKED_ASSERT #define CPPUNIT_ENABLE_NAKED_ASSERT 0[*] #endif [*] or 1, depending on the default desired. 3. Is it useful to have CPPUNIT_USE_TYPEINFO as well as CPPUNIT_HAVE_RTTI? Certainly you can't define the former without the latter. Would you ever WANT to disable using RTTI, if available? If not, then we can eliminate USE_TYPEINFO in favour of HAVE_RTTI. If disabling it _is_ deemed useful, then the same comment about the extra symbol applies; the stanza can be simplified to #ifndef CPPUNIT_USE_TYPEINFO #define CPPUNIT_USE_TYPEINFO 1 #endif -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 |
From: Baptiste L. <bl...@cl...> - 2001-06-18 07:21:17
|
> 3. Is it useful to have CPPUNIT_USE_TYPEINFO as well as > CPPUNIT_HAVE_RTTI? Certainly you can't define the former without the > latter. Would you ever WANT to disable using RTTI, if available? If > not, then we can eliminate USE_TYPEINFO in favour of HAVE_RTTI. If > disabling it _is_ deemed useful, then the same comment about the extra > symbol applies; the stanza can be simplified to > > #ifndef CPPUNIT_USE_TYPEINFO > #define CPPUNIT_USE_TYPEINFO 1 > #endif HAVE_RTTI say that you can do dynamic_cast<...>, USE_TYPEINFO say that typeinfo.name() returns a "human readable" name that can be used to identify test case. When you want maximum portability, you want to disable both. 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). |