Re: [Cppunit-devel] macros and templates
Brought to you by:
blep
From: Baptiste L. <bl...@cl...> - 2001-06-06 07:02:07
|
----- Original Message ----- From: "Steve M. Robbins" <ste...@vi...> To: <cpp...@li...> Sent: Sunday, June 03, 2001 1:49 AM Subject: [Cppunit-devel] macros and templates > I've added the generic TestAssert::assertEquals() method, > along with the new macros CPPUNIT_ASSERT, CPPUNIT_ASSERT_EQUAL, > and CPPUNIT_ASSERT_DOUBLES_EQUAL. The old naked assert and > friends are available by editing <cppunit/config.h>. I've added a default config.h for VC++ (we don't have a configure script ;-( ). When other WIN32 compilers will be added, we can update it to detect the compiler and set default accordingly. The new assert equals (I guess) make a compiler internal error in the cppunittests example. Weird, since it works just fine in another of mine project. I'll look into that and possible workaround (macro, namespace instead of class) later. I think we should add a CPPUNIT_ASSERT_MESSAGE macro, which take a boolean and a string which is added to the error message. This would allow the user to create new assertions. For example, you need to compare complex numbers with a tolerance. What do you think ? > > At the moment, the assertion_traits class requires string streams, > which does not exist in GCC before version 2.95.3. If you have any > bright ideas about workarounds for missing <sstream>, I'm all ears. > > All the old CU_* got renamed to CPPUNIT_*. > I did this with a global string replace. This changes some of the > MSVC files. I hope they still work. Let me know. Worked just fine. Thanks, 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). |