Should unittests run as logical part of compilation?

simendsjo simendsjo at gmail.com
Sun Jan 26 03:25:23 PST 2014


On Saturday, 25 January 2014 at 22:55:33 UTC, Andrei Alexandrescu 
wrote:
> There's this simple realization that unittests could (should?) 
> be considered an intrinsic part of the build process.
(...)

> In particular, this view of unittests declares our current 
> stance on running unittests ("run unittests just before 
> main()") as meaningless.
(...)

I wouldn't mind having unittests be a part of the compilation 
process, but I really don't think "running before main" is 
useless.
This lets me compile a version on my desktop and push the binary 
to a small VPS staging for running runtime tests. Compiling any 
non-trivial code on 512MB with the DMD frontend is impossible. I 
can also send a fully working application with unittests to a 
client as a beta before giving a production version.


More information about the Digitalmars-d mailing list