Unit testing with CTest

15 views
Skip to first unread message

Nicolas Alvarez

unread,
Jun 5, 2009, 1:56:46 AM6/5/09
to synecdo...@googlegroups.com
I am experimenting with CMake's cousin "CTest". It's not a unit test
framework; it's more like a test runner. It runs individual binaries that
return 0 on success and non-zero on failure. Apparently, it can also
automatically submit results to a website, which looks pretty interesting.

For unit test framework, I will start by using CppUnit; but there is no
particular reason to choose that one. I haven't looked at the alternatives
too closely. This is absolutely open to discussion.

Following a suggestion on a mailing list, the best way to do this seems to
be to create a single program with multiple test fixtures, each with
multiple functions (the test cases). The program would take the test
fixture name as a command line argument, and ctest would run it for each
fixture defined in a list.

I will now clone the cmake branch into a 'unittest' branch to do this.
Initial tests won't even have anything to do with Synecdoche, but I hope to
quickly move into testing functions in lib.

Reply all
Reply to author
Forward
0 new messages