DMD: how to restore old unittest+main

WebFreak001 d.forum at webfreak.org
Thu Aug 13 08:49:21 UTC 2020


On Thursday, 13 August 2020 at 07:52:07 UTC, novice3 wrote:
> Hello.
>
> I don't use dub.
> I use Windows and *.d file association to compile small apps by 
> dmd with "-i -unittest -g" switches.
> Now i update dmd, and found, that apps compiled with 
> "-unittest" not runs main().
>
> How i can restore old behaviour (run all unittests then main())
> *without use "--DRT-testmode=run-main" switch every time then i 
> start compiled app.exe*?
> I want just press Enter on app.d file, then press Enter on 
> app.exe.
> Any advises?
>
> Thanks.

Try

version (unittest) extern(C) __gshared string[] rt_options = [ 
"testmode=run-main" ];


More information about the Digitalmars-d-learn mailing list