documentable unittest

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Feb 7 15:06:50 PST 2013


On Thu, Feb 07, 2013 at 05:53:59PM -0500, Andrei Alexandrescu wrote:
> I'm very happy that this will be part of the upcoming release:
> https://github.com/D-Programming-Language/dmd/pull/1342 (see also
> http://d.puremagic.com/issues/show_bug.cgi?id=2630) allows defining
> unittests that simultaneously work as documentation. This is a great
> way to simultaneously write meaningful tests and good documentation
> examples.
> 
> If you want to help, feel free to hop on the Phobos documentation
> and convert some of it to use the new feature.
[...]

Woohoo!!! I'm going to update next[Even]Permutation and cartesianProduct
to use this ASAP.

Also, we should document this feature somewhere, preferably somewhere
prominent, like the pages that describe the ddoc format, or the
documentation for unittest blocks.

I think it also deserves an article somewhere (on the wiki, on Dr.
Dobbs, etc.). This is a very, very cool feature.


T

-- 
Almost all proofs have bugs, but almost all theorems are true. -- Paul Pedersen


More information about the Digitalmars-d mailing list