[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Random testing

From: Jonathan S. Shapiro <shap_at_eros-os.org>
Date: 2000-10-02 15:29:44 CEST

> Essentially: tests that can't be repeated are annoying. They'll tease
> you, but they won't help you.

I agree, but I'ld note that this should only be an issue where the tests
depend on the *value* generated. For example, using a random number
generator to produce the name of a temporary file is unlikely to be an issue
once the random number generator itself is known to work reasonably.

> I'm also not sure whether every system's rand () function uses the
> same algorithm.

There have been a number of algorithms over the years, but a given random
number generator will produce the same sequence if it is initialized with
the same seed.

FYI, the srand() generators generate miserably bad random numbers.

Received on Sat Oct 21 14:36:09 2006

This is an archived mail posted to the Subversion Dev mailing list.