Testing in the D Standard Library

Chris Wright via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Jan 22 17:52:29 PST 2017


On Sun, 22 Jan 2017 20:18:11 +0000, Mark wrote:
> Have you considered adding randomized tests to Phobos?

Randomized testing is an interesting strategy to use alongside 
deterministic testing. It produces more coverage over time. However, any 
given test run only has a fraction of the coverage that you see over a 
large number of runs.

In other words, if the randomized tests catch something, you don't know 
who dun it. This is generally considered a bad thing.

Phobos does have some tests that use a PRNG. They all use a fixed seed. 
This is a shortcut to coming up with arbitrary test data; it's not a way 
to increase overall coverage.

I think the right way to do it is to have a nightly randomized test build, 
but since I'm not willing to do the work, I don't have much say.


More information about the Digitalmars-d-announce mailing list