Named unittests

Jacob Carlborg doob at me.com
Mon May 20 09:32:38 UTC 2019


On 2019-05-18 16:56, Andrei Alexandrescu wrote:

> Doesn't that seem a bit much? It seems to me you either want to run 
> unittests or not, why run just a few? 

It's useful when you're just focusing on a single test. No point in 
running the other tests then. The test suite can take quite a long time 
to finish. The DMD test suite takes, I don't know, 10-20 minutes or 
something (a contributor mentioned it took 30 minutes). I would also use 
the "unittest" blocks for non-unit testing as well, like functional, 
integration and end to end testing. Those kind of tests can take hours.

> Going with the typechecking 
> metaphor - do we want to check some modules but not others?

Yes, definitely. Having the compiler type check the file I'm currently 
editing in my editor as I type would be great. If it can do that without 
checking the other files, sure why not? It would be faster.

> If including/excluding certain unittests is needed e.g. for time 
> reasons, "version" seems the right tool for the job. Or compiling some 
> modules with -unittest and others without. But that should be the 
> special case, not something supported at the command line level.

No, not good enough. It should not required to edit the code when 
selecting which tests to run.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list