[cartwheel] Testing C/C++ Code.

Titus Brown titus at caltech.edu
Wed Feb 28 12:16:38 PST 2007


On Wed, Feb 28, 2007 at 12:10:54PM -0800, Diane Trout wrote:
-> I wanted to check with everyone about testing C/C++ code. I've used 4
-> different methods, each with their own trade offs, and wanted to see if
-> there was a chance we could adopt a common set of C/C++ testing tools.

Sounds like "big design up front" to me, but probably wise ;)

-> Boost Test is exceptionally good at reporting what went wrong in your
-> test. For instance if a test segfaults or tosses an unexected exception,
-> Boost Test can catch and report the problem, and then continue running
-> the rest of your testsl

[ ... ]

-> Another solution would just be to wrap everything with a C/Python
-> binding and run all the tests from python. The only advantage to this is
-> we'd get all the unit test reports in once place. It's likely to be far
-> more fragile, and is also would  to break when a Python 3000 comes out.

I like the idea of combining boost tests with C/Python-wrapped tests.
There are a number of ways to integrate unit test reporting across both
of these tools; I personally would use 'nose' to do so.

In any case, IMO the first thing to do is to get the tests written and
working... ;)

cheers,
--titus



More information about the cartwheel mailing list