How can one reliably run unittests

Johan j at j.nl
Fri Aug 27 11:19:23 UTC 2021


On Friday, 27 August 2021 at 10:59:54 UTC, Mathias LANG wrote:
> On Friday, 27 August 2021 at 10:33:02 UTC, Johan wrote:
>> 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?
>
> I don't. I expect the _runtime_ to do it. And to give me the 
> tool to override it if I have needs that aren't covered by it. 
> Currently it only does the later.

For this discussion I consider the compiler+runtime to be a 
single entity, but OK: same question, why should the language 
runtime do it? I find it a large stretch to include full 
unittesting framework inside the scope of a language runtime's 
core functionality.
What is so special about unittesting that requires the 
implementation to be inside the runtime? The downsides are clear 
to me (and large), what advantage is gained by having it in the 
language runtime?

-Johan



More information about the Digitalmars-d mailing list