phobos unit tests

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 3 06:06:33 PDT 2016


On 9/3/16 5:36 AM, Manu via Digitalmars-d wrote:
> This document: https://wiki.dlang.org/Contributing_to_Phobos
>
> States: "Avoid unittest in templates (it will generate a new unittest
> for each instance) - put your tests outside"

Actually that's a good thing, sometimes you do want to run a unittest 
for each instantiation.

> Sounds reasonable, but then I realised that most of my unit tests are
> documenting unittests... this recommendation is in conflict with the
> documentation standards... who wins?

Just version it only for the documentation.


Andrei




More information about the Digitalmars-d mailing list