flux-framework/flux-core — pull request #35 by garlick (2014-10-07 00:59:33+00:00)
Title: run libutil unit tests with catch

Tom brought up the 'catch' unit test framework this morning. I read the tutorial and liked it
enough to make a trial branch where I imported the framework and moved over a few tests.
A short tutorial is here:

https://github.com/philsquared/Catch/blob/master/docs/tutorial.md

Catch is implemented in a single c++ header file which I imported to src/include where it can
easily be included anywhere in the project. I then created a test main in src/common/libutil
called 'runtests' and a test module called test-nodeset.cpp which is linked with runtests.
This module contains what was before in a nodeset_selftest() function in nodeset.c.
Tests can be added by defining new stanzas in an existing module, or by linking a new module
to the runtests main.

Have a look - it seemed pretty reasonable to me.

The runtest program is then run as a single test invocation from 'make check'.