Some hints on the CuTe C++ Unit Testing


I just had some minor problems getting started with CuTe ( since the documentation on didn't match the reality of the version I'm using.

If you're using Eclipse, a slight adjustment needs to be done to the includes:

  1. #include "cute/cute_runner.h"
  2. #include "cute/cute_counting_listener.h"
  3. #include "cute/eclipse_listener.h"

To setup your tests, you've got to write something like:

  1. void runTest()
  2. {
  3.    cute::suite s;
  4.    s.push_back(CUTE(myObject->testFunc));
  5.    cute::runner<cute::counting_listener<cute::eclipse_listener> > run;
  6.    run(s);
  7. }

Finally, some remarks: CuTe seems to be nice and easy, just what I like for medium sized projects. It's integrated into Eclipse. If it works out for me, I'll let you know. But I've found a flaw already: There seems to be no version number coded into the library so I can't say, which version I'm running. Nasty if you're writing blog entries about it or if you're puzzling about updates.

Wish you long days and pleasant nights,