Named unittests

Meta via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 31 07:55:03 PDT 2015


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);
}


More information about the Digitalmars-d mailing list