1.1 --- a/test/test_tools.h Mon Oct 02 14:41:53 2006 +0000
1.2 +++ b/test/test_tools.h Mon Oct 02 16:11:00 2006 +0000
1.3 @@ -28,6 +28,8 @@
1.4 #include <lemon/concept_check.h>
1.5 #include <lemon/concept/graph.h>
1.6
1.7 +#include <lemon/random.h>
1.8 +
1.9 using namespace lemon;
1.10
1.11 //! \ingroup misc
1.12 @@ -176,16 +178,8 @@
1.13 return n;
1.14 }
1.15
1.16 -int _urandom_init() {
1.17 - int seed = time(0);
1.18 - srand(seed);
1.19 - return seed;
1.20 -}
1.21 -
1.22 int urandom(int n) {
1.23 - static int seed = _urandom_init();
1.24 - ignore_unused_variable_warning(seed);
1.25 - return (int)(rand() / (1.0 + RAND_MAX) * n);
1.26 + return rnd.getInt(n);
1.27 }
1.28
1.29 #endif