improve c++ test harness