Named unittests

Adam D. Ruppe destructionator at gmail.com
Sat May 18 02:50:52 UTC 2019


On Friday, 17 May 2019 at 21:56:45 UTC, Andrei Alexandrescu wrote:
> Again: the entire unittest workflow should be designed, 
> handled, and marketed as an extension of the semantic checking 
> process. The fact that it's done after code generation is a 
> minor detail.

I like this a lot. And I think I have a plan to make it work 
nicely with only one change to the compiler (when -unittest is 
used, the compiler automatically runs the test program before 
exiting successfully) and a few small changes to druntime (the 
tests are run only when given a particular command line flag).

D's built in unittests are easy enough you might as well write 
them, it is little effort.

This would make running them so seamless you don't even realize 
it is happening too. (heck I kinda want -unittest to become a 
default, so dmd runs it unless you specifically tell it not to. 
but that's another conversation).

i might play with this over the weekend.


More information about the Digitalmars-d mailing list