Follow @RoyOsherove on Twitter

CxxTest for C++ - easier unit testing?

CxxTest for C++ seems like a nice way to write unit tests in C++. It uses Perl to generate Cpp files from regular classes and then you compile those into unit tests and run them. this intermediate step saves you lots of trouble in declaring your tests in C++ code "that hard way" and simply lets you write code that works.
 
I was alerted to this by someone who attended one of my courses the other day. Very interesting.
 
Some of the features:
  • Doesn't require RTTI
  • Doesn't require member template functions
  • Doesn't require exception handling
  • Doesn't require any external libraries (including memory management, file/console I/O, graphics libraries)
  • Is distributed entirely as a set of header files

This makes it extremely portable and usable.

TDD and test generation in VS 2005 can be annoying and tricky if you don't watch out

IVBUG: Multithreaded UIs with VB.NET