[RFC] Split tests and examples in KDE4

Adriaan de Groot groot at kde.org
Tue Jul 11 09:14:04 BST 2006


On Sunday 09 July 2006 14:16, Brad Hards wrote:
> I'd like to propose that we split that code into /tests and /examples, with
> separate options to enable each:

I'm all for it -- at least as far as /examples goes for APIDOX. I *think* 
that /examples is automatically added as a source for @example in the APIDOX. 
I'd have to check.

There are several examples (!?) of examples being unclear or broken in the 
existing APIDOX because they are cut-and-paste into @code and not updated; 
incomplete examples are annoying as well. Having *complete* examples -- not 
necessarily in the APIDOX, I can believe that short examples work best in the 
text -- is a valuable thing.

As a general rule for the structure of an example, I'd go for:

- code fragments -- functions, whatever -- in separate files
- a main example file that #includes the code fragments

This allows at least that the example compiles while only pulling in the most 
interesting or instructive parts of the example into the text.

-- 
KDE Quality Team
GPG: FEA2 A3FE




More information about the kde-core-devel mailing list