Re: [Cppunit-devel] Most user-friendly version of CppUnit
Brought to you by:
blep
From: Baptiste L. <gai...@fr...> - 2003-08-12 07:25:21
|
----- Original Message ----- From: "Noel Yap" <Noe...@mo...> To: "Martin Lescuyer" <mle...@fr...> Cc: <bjo...@co...>; "Bob Johnson" <bjo...@pc...>; <cpp...@li...> Sent: Tuesday, July 29, 2003 4:02 PM Subject: Re: [Cppunit-devel] Most user-friendly version of CppUnit > The macros certainly go a long way in making CppUnit a bit more user friendly. > > Personally, I don't like the macros since: > - IIRC, they get in the way of emacs fontification and indentation Surely someone fixed this parsing issue. At worth, CPPUNIT macros should be consider as function declaration with omitted return type. But this kind of macros is already specific to CppUnit. A few libraries with similar macros that come to mind: Qt, WxWindow, MFC. Fairly common stuffs. > - they don't conform to our coding standards > - I just don't like using macros for code generation purposes, there are better tools out there for this Those macros are designed to remove code duplication. They also help isolate the test code from the underlying framework (switching to cppunit v2 will me much simpler if you are using those macro, as it is fairly simple to write an a portability layer for them). I don't know of any better way to 'generate' code than those 'fairly' simple macro. May be you would like to share (cppunit v2 is relying on a similar scheme at the time). > > Noel > > Martin Lescuyer wrote: > > > > In addition, I'd say that helper macros help a lot when writing a new > > testMethod, and makes its registration within a TestFixture and the > > TestFixture into a TestSuite *VERY* easy. > > Martin > > > > Just an illusion, but so good, so nice ! > > > > Noel Yap <Noe...@mo...> > > Sent by: cpp...@li... > > 28/07/2003 21:40 > > Please respond to Noel.Yap > > > > > > To: Bob Johnson <bjo...@pc...> > > cc: cpp...@li..., bjo...@co... > > Subject: Re: [Cppunit-devel] Most user-friendly version of CppUnit > > > > Depending on what you're expecting, I'm not sure you'll be able to get > > what you want since JUnit uses reflection to "know" the names of your test > > cases while C++ doesn't have reflection. > > > > I think, once you start using CppUnit, it's pretty easy to use. In order > > to get automagic knowledge of test case names, in our build, I put > > together a script using typical command-line tools (eg perl, sed, awk, > > grep) so in practice, it's possible to get > > what JUnit affords, but it'll take a little more work. > > > > HTH, > > Noel |