Hi Nils,
On 2013-02-27, Nils Bruin <
nbr...@sfu.ca> wrote:
> On Feb 27, 9:39 am, Timo Kluck <
tkl...@gmail.com> wrote:
>> The issue is that we're upgrading boost, and apparently, its random number
>> generator has slightly changed. Therefore, we have some failing doctests
>> for random_set.
>
> Do we really want to test our random number generators for
> deterministic behaviour? If so, the test should probably at least set
> the seed prior to testing things that depend on actual values
> produced.
Isn't this the case already? In doctests, one can assume that the output
of our random number generators is deterministic.
> Of course, if the algorithm used for the pseudo-random
> generator has actually changed, setting the seed would not be enough,
> but that should be rare.
If I understand correctly, that rare situation occurs here. Hence, one can
still rely on deterministic output, but a *different* deterministic output.
> The more appropriate thing might be to rewrite the test to check
> general behaviour rather than rely on exact output.
+1
Testing against theorems (such as: One has random data, but the test is
using an identity that must hold for any data) is most elegant.
Cheers,
SImon