On Monday, 30 March 2015 at 22:50:21 UTC, Andrei Alexandrescu
wrote:
Violent agreement here. I was just saying unittests should be
part of the build process, not the run process. Running
unittests and then the app is a bad idea.
Sounds like a good idea to me.
Then -unittest should be enabled by default?
Implementationwise it sounds like you want another entry point
apart from main, e.g. "main_unittest". Then the build process is
compile-link-unittest. Afterwards the run process is the usual
main call.
It makes binaries bigger though. Maybe unittest-specific code can
be placed in a special segment, which can be removed during
deployment?