CppUnitLite Cookbook?

CppUnitLite Cookbook?

Post by Ke » Fri, 20 Jun 2003 01:29:42



Hi.

I'm about to start working on a midsize defense software project
written in C++ on Unix.  I wanted to introduce the idea of "unit test
first" to the group and will be in a position to have my voice heard.

I've dabbled a bit with CppUnit on an AIX Unix platform.  That worked
pretty well.  However, now I see there is a CppUnitLite available.
I'm assuming that it is easier to use than CppUnit (I really liked
CppUnit, but I can see how it might be a hard sell across the board to
a group of 25 or so programmmers).

Is there a cookbook for CppUnitLite?  I see where it can be
downloaded, but I'm not seeing any information on how to use it.

Has anyone used CppUnitLite?  If so, are you happy with it?  Are there
other frameworks you'd recommend?  I noticed CUJ presented one by
Chuck Allison at http://www.cuj.com/documents/s=8035/cuj0009allison1/allison1.htm.
 Any opinion on that?

Thanks so much,

Ken

 
 
 

CppUnitLite Cookbook?

Post by Keith Ra » Sun, 22 Jun 2003 02:10:54




> Hi.

> I'm about to start working on a midsize defense software project
> written in C++ on Unix.  I wanted to introduce the idea of "unit test
> first" to the group and will be in a position to have my voice heard.

> I've dabbled a bit with CppUnit on an AIX Unix platform.  That worked
> pretty well.  However, now I see there is a CppUnitLite available.
> I'm assuming that it is easier to use than CppUnit (I really liked
> CppUnit, but I can see how it might be a hard sell across the board to
> a group of 25 or so programmmers).

> Is there a cookbook for CppUnitLite?  I see where it can be
> downloaded, but I'm not seeing any information on how to use it.

> Has anyone used CppUnitLite?  If so, are you happy with it?  Are there
> other frameworks you'd recommend?  I noticed CUJ presented one by
> Chuck Allison at
> http://www.cuj.com/documents/s=8035/cuj0009allison1/allison1.htm.
>  Any opinion on that?

I suggest writing your own test framework, either from scratch, or by
modifying an existing one. Then you will know how to use it. Do it with
a pair or a small team.

See Kent Beck's book on Test Driven Development, he has chapter or two
on developing a test framework test-first.

I've written the beginnings of a test framework in an hour while
teaching a friend test driven development - at first, the only function
in the framework was "assert(bool)", and we evolved the test framework
as we needed it to cover the tests we wanted to write, and refactored to
remove duplication, ending up in a TestSuite and TestCase classes, etc.
--
C. Keith Ray

<http://homepage.mac.com/keithray/xpminifaq.html>

 
 
 

1. Cookbook wanted: how to do printf-like formatting with ostream?

Hi!

I am a bit ashamed to ask this question after several
years of using C++, but it's better late than never :-)

In C++ community we often hear advise: "don't use printf,
use ostream!". That's fine, but I had some hard time figuring out
how to make ostream to do an equivalent of, say,

void* Ptr = ...;
printf("0x%08X", Ptr);

or

double SomeValue = ...;
printf("%2.3f", SomeValue );

Where can I find a "cookbook" that "translates" printf()
functionality to ostream functionality? Are there things that
printf() can do and ostream cannot?

URL with some small code examples is most welcome.

Best regards
Ivan

P.S. Yes, I know about manipulators. The question is how to
use them most elegantly end efficiently to do output formatting
similar to what printf() does.


      [ about comp.lang.c++.moderated. First time posters: do this! ]

2. Come download Nesticle 0.32 off my page!

3. Vermont Recipes - A Cocoa Cookbook

4. Want to upgrade to IE 4

5. VC6 & cppunitlite derivitive

6. New! Epson "Colorfast" Paper - A solution to orange shift?

7. cppunit vs cppunitlite

8. Best Supra 28.8 string

9. Where is "CookBook"?

10. Cookbook for my network

11. Cookbook for my system

12. cookbook wanted.......expert advise

13. Cookbook wanted....expert advise