How can one reliably run unittests
Johan
j at j.nl
Fri Aug 27 10:33:02 UTC 2021
On Friday, 27 August 2021 at 07:48:40 UTC, Mathias LANG wrote:
>
> But when I throw in the `-unittest` switch (or the `-cov` or
> `-profile` for that matter), I want all the bells and whistles.
> Give me colors, an ncurses interface, an HTTP server even! Give
> me the full battery pack. Don't expect everyone and their
> mother to implement their own testing framework, that's just
> bonkers.
Why would you expect a _compiler_ to implement a testing
framework?
If the compiler implements the testing framework, any improvement
of the testing framework would require an update of the compiler,
which is a _very_ large hurdle. (You want colors? You get 50 new
language semantic changes for free!)
I think it's much better if the testing framework is
implementated separate from anything else. That doesn't mean
everybody has to implement it from scratch, just that they should
download it from some other location than the compiler website.
Separation of concerns.
(by the way, I'm convinced `unittest` is a misfeature of the
language. Besides the clear downside that is apparent from this
thread, it hurts legibility and because of that it actually
discourages extensive unittesting)
-Johan
More information about the Digitalmars-d
mailing list