Named unittests

Kapps via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 30 15:21:32 PDT 2015


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.


More information about the Digitalmars-d mailing list