Named unittests

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 31 11:21:32 PDT 2015


On 3/31/15 7:55 AM, Meta wrote:
> On Monday, 30 March 2015 at 21:58:13 UTC, Dicebot wrote:
>> I'd prefer putting alternative test runner into Phobos instead which
>> will support `@name("Something") unittest { }`
>
> 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);
> }

That's what I had in mind, too. -- Andrei


More information about the Digitalmars-d mailing list