@saagar Yeah, that doesn't help much. In the sorting example, verifying the special condition (sorted input) is trivial compared to sorting. But if the verification is as complex as the algo, you may be introducing errors on the tests as well.
Having a test suite with tests that fail occasionally in situations that are not really a test failure isn't great. You'll quickly get used to ignore them and you will eventually miss a real failure.
@gnachman I guess this could work. I was against seeding the PRNG because it’s always testing the same thing, which kind of negates the point of testing against novel random data. But if the altern...
@saagar But there's a point at which the probability is so infinitesimally small that it's irrelevant, right? I mean the test could also be messed up by cosmic rays flipping bits (perhaps so many in the wrong places that ECC doesn't save you), but you don't worry about that either.
If the chance of anyone ever running into this is smaller than, say, you winning the lottery jackpot for several weeks in a row, then stop worrying about it.