autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unit testing with autotools


From: Braden McDaniel
Subject: Re: unit testing with autotools
Date: Mon, 13 Mar 2006 14:51:33 -0500
User-agent: Thunderbird 1.5 (Windows/20051201)

Chris Pickett wrote:
Hi,

I'd like to do unit testing for test-driven development of C programs. I'd also like to use up-to-date autotools. I was wondering if anyone had any experience with unit testing in their projects and had recommendations, or even if autoconf was considering it for the future.

By unit testing I mean writing multiple small tests for each function in an interface. The prescribed development methodology is to write failing tests before you write code that will make them pass.

Autotest would be good as a wrapper around a unit-testing framework, but not good for driving the actual low-level tests. The same goes for DejaGNU.

automake's TESTS is sufficient for running basic pass/fail programs. autotest is useful when you need to provide input and/or check output.

I converted my project's tests from DejaGnu to autotest some months ago; I don't regret it.

I use the Boost Test library; which is C++, but probably as appropriate for C as any of the other C++ solutions you're considering.

I'm also interested in more detailed or "best practice" autotest tutorials but the advice in the archives seems to be, "look at other projects and existing tutorials and cobble something together."

Well, in the spirit of that advice, feel free to have a look at what I do in OpenVRML <http://openvrml.org>.

Braden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]