Named unittests

Mathias Lang via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 30 16:02:22 PDT 2015


We do have an `@name` as UDA in Vibe.d, so that'll be a breaking change
(But `@NamedUnittest("name")` will do).
I also think it should be a library solution.

2015-03-31 0:21 GMT+02:00 Kapps via Digitalmars-d <
digitalmars-d at puremagic.com>:

> On Monday, 30 March 2015 at 21:52:35 UTC, Andrei Alexandrescu wrote:
>
>>
>> I'd like to make a DIP for named unittests. Who can help me with that?
>>
>>
>> Andrei
>>
>
> I agree that using library-defined annotations would be a better approach
> than language changes. Currently things like tested use the form
> @name("AddPeer") unittest { /* ... */ }
> Which is nice, because then you can extend it as desired, such as
> @parallel @name("AddPeer") unittest
>
> The main issue is that at this point, practically every single person has
> defined:
> struct Name {
>     string val;
> }
> string name(string val) { return Name(val); }
>
> Adding common attributes such as this to Phobos or druntime and
> potentially have the default unittest runner include them would be good.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150331/8990a082/attachment-0001.html>


More information about the Digitalmars-d mailing list