Since I’m off to work with C++ for a few months, I went and investigated CppUnit. CppUnit started life as a port of JUnit, but has gone on to develop some neat, C++-style features, such as the test registry.
Unfortunately, CppUnit requires a fairly modern C++ compiler. Since my client is using HP-UX 10.20, CppUnit won’t be an option.
Partly to address this need for a unit test framework, and partly as an exercise in getting my head around C++ again, I wrote my own, minature unit test framework. The source code is online, the most important file being unittest.h. The generated documentation is also online.
A quick To Do list:
Being my first C++ code for quite some time, comments, suggestions and critique are very welcome.