[RFC] Split tests and examples in KDE4

Friedrich W. H. Kossebau Friedrich.W.H at kossebau.de
Sun Jul 9 14:28:04 BST 2006


Am Sonntag, 9. Juli 2006 14:44, schrieb Frans Englich:
> On Sunday 09 July 2006 12:16, Brad Hards wrote:
> > G'day,
> >
> > Currently we have a mixture of automatic tests (using QTestLib), and
> > non-automated tests/examples in kdelibs. Mostly, they are in /tests
> > subdirectories.
> >
> > Those are mostly [1] built when you use enable the KDE4_BUILD_TEST option
> > to cmake.
>
> [...]
>
> > The examples would then be linked into the apidox.
>
> Yes, thank you for suggesting this. I already do this for Patternist,
> kdenonbeta/kdom/patternist, and it really make the Doxygen easier to
> maintainer since one can actually verify that code examples doesn't contain
> errors, and the doxygen is easier to edit(since the code listings are out
> of the way).
>
> However, often it isn't as simple as moving the code listing out to a file.
> Most code examples are 5-6 lines taken directly from a function body. If
> that is put in a compilation unit, you'll miss header inclusions and
> typically a wrapping function definition, and usually one doesn't want that
> in the code example.
>
> I solve that by having a central cpp file from which I include other cpp
> files which are the actual examples, or I use Doxygen's @skip/@until
> commands(a bit cumbersome, but it works). Perhaps something like that is
> applicable in this case.

Interesting approach. Could tricks like this be collected somewhere, on d.k.o?

Regards
Friedrich




More information about the kde-core-devel mailing list