Extending unittests [proposal] [Proof Of Concept]
Johannes Pfau
nospam at example.com
Fri Sep 21 01:42:10 PDT 2012
Am Thu, 20 Sep 2012 22:41:23 +0400
schrieb Dmitry Olshansky <dmitry.olsh at gmail.com>:
> On 20-Sep-12 22:18, bearophile wrote:
> > Johannes Pfau:
> >
> >> The perfect solution:
> >> Would allow user defined attributes on tests, so you could name
> >> them, assign categories, etc. But till we have those user defined
> >> attributes, this seems to be a good solution.
> >
> > We have @disable, maybe it's usable for unittests too :-)
> >
> We have version(none)
>
Actually @disable is better. version(none) completely ignores the test.
But @disable could set a disabled bool in the UnitTest struct (and set
the function pointer to null). This way you can easily get all disabled
unittests:
./unittest --show-disabled
=========================== core.thread ============================
src/core/thread.d:1761
...
This can be implemented with 3 lines of additional code. The real
question is if it's ok to reuse @disable for this.
More information about the Digitalmars-d
mailing list