Named unittests

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 31 13:04:00 PDT 2015


On 2015-03-31 16:55, Meta wrote:

> Aren't unittest blocks just special functions? If that's the case, there
> should be no problem being able to give them names. It seems to me that
> it would entail the lifting of a restriction rather than a real language
> change.
>
> Before:
> unittest
> {
>      assert(1 == 1);
> }
>
> After:
> unittest checkBasicLaw
> {
>      assert(1 == 1);
> }

I prefer a UDA accepting a string, this can contain spaces and it's not 
limited to identifier names.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list