Postmortem: Template unittests are bad & you shouldn't catch Error
Paul Backus
snarwin at gmail.com
Thu Oct 22 16:39:48 UTC 2020
On Thursday, 22 October 2020 at 16:18:14 UTC, H. S. Teoh wrote:
> 2) Ddoc's unittests require unittest blocks to be attached to
> the symbol they're documenting. So you pretty much have no
> choice, unless you use Phobos StdDdoc hack (ugh):
It seems like the obvious solution is to remove this limitation.
For example, maybe the documentation generator should allow you
to attach a unittest to any symbol in the same module, regardless
of where it appears in the code:
/// Documents: Nullable.get
unittest
{
/* etc. */
}
More information about the Digitalmars-d
mailing list