How can one reliably run unittests

jfondren julian.fondren at gmail.com
Tue Aug 31 17:04:10 UTC 2021


On Tuesday, 31 August 2021 at 16:52:59 UTC, Alexandru Ermicioi 
wrote:
> Imho this would be a lot more flexible. Dmd could come with an 
> default runner, and if someone doesn't like it, he could just 
> replace runner with his own implementation, that would do all 
> the prettyfying he wants.

This is already the case. Replacing the default runner is what 
silly's doing here: 
https://gitlab.com/AntonMeep/silly/-/blob/master/silly.d#L29

>
> The only thing needed here is well built unit test api exposed 
> to the runner and reflection api at runtime, to allow that said 
> runner inspect underlying tests for additional information, 
> such as annotations, to do more advanced logic than default 
> runner would do.

"at runtime" aside, this is already possible. I give an example 
of a test runner that runs tests differently depending on its 
annotations in 
https://forum.dlang.org/post/bukhjtbxouadyunqwdih@forum.dlang.org


More information about the Digitalmars-d mailing list