How can one reliably run unittests

Walter Bright newshound2 at digitalmars.com
Wed Aug 25 22:50:53 UTC 2021


On 8/25/2021 3:48 PM, H. S. Teoh wrote:
> This always happens to me, so much so that I've come to insert the
> following as boilerplate to all my code:
> 
> 	version(unittest){} else
> 	int main(string[] args) { ... }


That works, too.


More information about the Digitalmars-d mailing list