Showing unittest in documentation (Was Re: std.unittests [updated] for review)
Simen kjaeraas
simen.kjaras at gmail.com
Mon Jan 24 13:46:59 PST 2011
Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org> wrote:
>> Documentation is a reference, not a novel. If someone looked up the
>> documentation for "bar", why make them jump over to "foo" (and make sure
>> they know to do so) to see bar's examples?
>
> Then there better are two examples, one focused on foo and the other on
> bar. Anyway, I don't see the need for such a feature. All I want is to
> have certain unittests appear in the generated documentation.
Consider fopen and family - would you not say that an example like the
below is good enough for both fopen and fclose?
FILE* pFile;
pFile = fopen( "myfile.txt", "w" );
if ( pFile != null ) {
fputs ("fopen example",pFile);
fclose (pFile);
}
--
Simen
More information about the Digitalmars-d
mailing list