Re: dmd -unittest works poorly with executables

2018-12-09 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/8/18 3:16 PM, Andrew Pennebaker wrote: I think it's lame to have to use magical code like `version(unittest) {} else` to guard our main functions, when we run unit tests. Could D go ahead and do the right thing, automatically shadowing our main functions when the unit tests are run?

Re: dmd -unittest works poorly with executables

2018-12-08 Thread Neia Neutuladh via Digitalmars-d-learn
On Sat, 08 Dec 2018 20:16:09 +, Andrew Pennebaker wrote: > I think it's lame to have to use magical code like `version(unittest) {} > else` to guard our main functions, when we run unit tests. Could D go > ahead and do the right thing, automatically shadowing our main functions > when the unit

Re: dmd -unittest works poorly with executables

2018-12-08 Thread Paul Backus via Digitalmars-d-learn
On Saturday, 8 December 2018 at 20:16:09 UTC, Andrew Pennebaker wrote: I think it's lame to have to use magical code like `version(unittest) {} else` to guard our main functions, when we run unit tests. Could D go ahead and do the right thing, automatically shadowing our main functions when

dmd -unittest works poorly with executables

2018-12-08 Thread Andrew Pennebaker via Digitalmars-d-learn
I think it's lame to have to use magical code like `version(unittest) {} else` to guard our main functions, when we run unit tests. Could D go ahead and do the right thing, automatically shadowing our main functions when the unit tests are run?