On 3/31/15 9:21 AM, qznc wrote:
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?

Probably not; we're looking at two different builds. The build to be deployed has no unittest code at all.

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?

Interesting. Or could be a dynamically-loaded library. But... crawl before we walk.


Andrei

Reply via email to