[ccan] ccan lint, doxygen and unit tests

Tim Post echo at echoreply.us
Wed Feb 25 20:46:53 EST 2009


Hi, talking to myself again ...

On Wed, 2009-02-25 at 17:33 +0800, Tim Post wrote:

> /**
>  * Check if foo can bar
>  * @param .. yadda yadda
>  * @tap++
>  * @test ok1(foo(foo[1], foo[2]));
>  */
> 
> ... that may surely tickle a GSOC student :) Its not likely that they'd
> accomplish it in a summer, but a good project to design. The generated
> test suite would need human attention (how else could it get foo[] ?)
> but:
> 
> 1 - It breaks the tests totally at build time if someone forgets
> something
> 
> 2 - Its much easier to keep up on unit testing, (if done correctly) with
> very little time involved.

The header for foo, or the test/foo.h could contain most things that
these tests need. Of course, the proposed 'cctest' program could simply
exit non zero and throw a complaint to stderr if someone added something
and forgot to include a test.

Meanwhile, .cctestignore could keep such complaints at bay.

Either way, its:

1  - Mostly added for you in a non-destructive way to the original tests
2  - Deliberately ignored

Cheers,
--Tim





More information about the ccan mailing list