How can one reliably run unittests

Walter Bright newshound2 at digitalmars.com
Wed Aug 25 20:49:32 UTC 2021


On 8/24/2021 5:21 AM, deadalnix wrote:
> Adding a main for libraries is required, or it won't link, but adding one to 
> executable is going to cause a link error.

This is indeed a real problem. It was solved with the -main switch to dmd, which 
will just stick one in for you. I use it all the time for unit testing modules.


More information about the Digitalmars-d mailing list