Test harness code for C++ unit testing

Many of these tests are run during the build process. In that case on
unix, if a test fails follow the error messages to debug it under gdb.