RE: [Cppunit-devel] config.h changes committed
Brought to you by:
blep
From: Baptiste L. <gai...@fr...> - 2001-06-18 12:43:07
|
Quoting Bastiaan Bakker <bas...@li...>: > > 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. Naked assert should be disabled by default. I don't remember why I wrote this like that (the weirdest stuff is that I remember having to make the change to the CPPUNIT macros in one of my project because the naked assert where not defined?!?). The logic behind this, is that you may need some day to use a third-party library which rely on or define "assert". If the user want a shorter form to write assertion (CPPUNIT_ASSERT_EQUAL is quite verbose), aliases to cppunit macros can easily be defined. Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Language: English, French |