dmd -unittest=<pattern> (same syntax as -i)

Dejan Lekic dejan.lekic at gmail.com
Fri Mar 16 14:32:47 UTC 2018


On Wednesday, 14 March 2018 at 22:04:50 UTC, Adam D. Ruppe wrote:
> On Wednesday, 14 March 2018 at 21:22:01 UTC, Timothee Cour 
> wrote:
>> would a PR for `dmd -unittest=<pattern> (same syntax as -i)` 
>> be welcome?
>
> so when this came up on irc earlier (was that you?) this was 
> the first thought that came to my mind. I'd support it, tho I'm 
> no decision maker.

I guess it was me talking about it two days ago on IRC...

Almost exclusively I need to run unittests only in the module I 
currently work on and it really makes no sense to run other 
unittests at that point of time (unless I explicitly want to). I 
would even go further to say that we basically need to be able to 
run particular unittest.

What I do at the moment is that I developed this kind of practice 
to have a test_runner.d top-level module in every D project of 
mine that contains tests I do during the development of 
particular feature TDD style, and then once I am done, I move 
this code to appropriate unittest blocks in my final module...

There are bunch of issues with existing support for unittests 
that could be solved to make unit-testing a really pleasant 
activity.


More information about the Digitalmars-d mailing list