Exit before second main with -funittest
Mathias LANG
geod24 at gmail.com
Fri Jul 30 04:22:12 UTC 2021
On Friday, 30 July 2021 at 03:45:21 UTC, Ali Çehreli wrote:
> Almost all of my programs are in the following pattern:
>
> ```D
> import std.stdio;
>
> void main(string[] args) {
> version (unittest) {
> // Don't execute the main program when unit testing
> return;
> }
> }
> ```
Are you aware that this isn't necessary since v2.090.0 ?
https://dlang.org/changelog/2.090.0.html#unittest-default
More information about the Digitalmars-d-learn
mailing list