[ccan] ccan lint, doxygen and unit tests

Adam Kennedy adamkennedybackup at gmail.com
Mon Mar 2 09:56:32 EST 2009


For a precedent on doing inline unit testing (i.e. something to mine for
implementation ideas) see Test::Inline, which I implemented for Perl.

http://search.cpan.org/~adamk/Test-Inline-2.208/lib/Test/Inline.pm

Adam K

2009/2/25 Tim Post <echo at echoreply.us>

> Hi,
>
> I am soon to upload iniparser as a converted module and am correcting
> some things in the original author's code.
>
> Excessive whitespace bugs me .. so do merge conflicts resulting from
> correcting those instances if I'm going to maintain the module. I'd
> rather just pull patches from the author (if they make sense) apply them
> cleanly and upload a new version. Yeah, I'm going to hit conflicts
> anyway, but far less if I'm correcting cstyle.
>
> If someone shares my nits, they can modify the module in place, merge
> conflicts become their problem.
>
> So, is a score of 4/5  (or after GSOC 6/10) acceptable, if the only
> thing that lint complains about is whitespace?
>
> Secondly, can we introduce a central doxyfile (I'm happy to maintain it)
> so that documentation per module can be extracted? Modules that have
> such comments can be easily added to this file in a uniform way.
>
> Otherwise, each module would have its own, generated documentation would
> be inconsistent at best and we're riddling the grand makefile with shell
> hacks.
>
> Finally, we have unit tests. Could someone comment a function like this
> and have them generated automagically? (Rusty, please forgive the winged
> comment, I'm making it compatible with doxygen)
>
> /**
>  * 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.
>
>
> Cheers,
> --Tim
>
>
>
>
> _______________________________________________
> ccan mailing list
> ccan at ozlabs.org
> https://ozlabs.org/mailman/listinfo/ccan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20090302/8d6b881d/attachment.htm>


More information about the ccan mailing list