Here’s the usual way I setup my main() for unit tests in unit_t.cpp. You can run either the entire test suite or specify an individual test on the command line:
$ ./unit_t TestWithin::testWithinDouble
Here’s the code:
Continue reading “C++ unit test”