Parallel execution of unittests

Jeremy Powers via Digitalmars-d digitalmars-d at puremagic.com
Thu May 1 12:32:51 PDT 2014


>
> Last but not least, virtually nobody I know runs unittests and then
>> main. This is quickly becoming an idiom:
>>
>> version(unittest) void main() {}
>> else void main()
>> {
>>     ...
>> }
>>
>> I think it's time to change that.
>>
>

The current system of running unit tests prior to main is, in my opinion,
fundamentally broken.

Logically, the unit tests are a build step - something you do after compile
to ensure things are good.  Tying them to running main means I cannot have
a build that passes unit tests that is also a production build.

Granted, it is (as far as I know) impossible to actually compile a
production version of code separately from the unittest code, and be able
to run the one on the other.  But it would be nice to move to something
more in line with unittest-as-build-step, rather than -as-different-build.


On named tests, I heartily support this.  Especially if it comes with the
ability to selectively run one test - such is incredibly useful for large
projects, to quickly iterate on broken bits.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140501/b013dbb6/attachment.html>


More information about the Digitalmars-d mailing list