Should unittests run as logical part of compilation?

bearophile bearophileHUGS at lycos.com
Sat Jan 25 15:45:20 PST 2014


Andrei Alexandrescu:

> version(unittest) void main() {}
> else void main()
> {
>     ...
> }

This is an example of bit a more general need: in D I'd like to 
create modules that can be imported from other modules to use 
their functionality; and to run their own main() when they are 
not imported from other modules. It's a simple feature that is 
still missing in D.

Bye,
bearophile


More information about the Digitalmars-d mailing list