diff options
author | Björn Gustavsson <[email protected]> | 2015-12-09 15:41:28 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-12-11 14:37:46 +0100 |
commit | 4145a6e4a5a65b1ba070328b03b8a0c085d9feba (patch) | |
tree | fe47b1e3ff512820824c0a3758285d40bf6862f5 /lib/stdlib/test/dict_SUITE.erl | |
parent | 51f1e296e7d8709df6324f78e365446a22201cf1 (diff) | |
download | otp-4145a6e4a5a65b1ba070328b03b8a0c085d9feba.tar.gz otp-4145a6e4a5a65b1ba070328b03b8a0c085d9feba.tar.bz2 otp-4145a6e4a5a65b1ba070328b03b8a0c085d9feba.zip |
stdlib tests: Replace 'random' with 'rand'
Diffstat (limited to 'lib/stdlib/test/dict_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/dict_SUITE.erl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/stdlib/test/dict_SUITE.erl b/lib/stdlib/test/dict_SUITE.erl index 648154ebbe..aff73b176d 100644 --- a/lib/stdlib/test/dict_SUITE.erl +++ b/lib/stdlib/test/dict_SUITE.erl @@ -108,7 +108,7 @@ iterate_1(M) -> M(empty, []). iterate_2(M) -> - random:seed(1, 2, 42), + rand:seed(exsplus, {1,2,42}), iter_tree(M, 1000). iter_tree(_M, 0) -> @@ -117,7 +117,7 @@ iter_tree(M, N) -> L = [{I, I} || I <- lists:seq(1, N)], T = M(from_list, L), L = lists:reverse(iterate_tree(M, T)), - R = random:uniform(N), + R = rand:uniform(N), KV = lists:reverse(iterate_tree_from(M, R, T)), KV = [P || P={K,_} <- L, K >= R], iter_tree(M, N-1). @@ -156,7 +156,7 @@ test_all(Tester) -> spawn_tester(M, Tester) -> Parent = self(), spawn_link(fun() -> - random:seed(1, 2, 42), + rand:seed(exsplus, {1,2,42}), S = Tester(M), Res = {M(size, S),lists:sort(M(to_list, S))}, Parent ! {result,self(),Res} @@ -194,12 +194,12 @@ rnd_list_1(0, Acc) -> Acc; rnd_list_1(N, Acc) -> Key = atomic_rnd_term(), - Value = random:uniform(100), + Value = rand:uniform(100), rnd_list_1(N-1, [{Key,Value}|Acc]). atomic_rnd_term() -> - case random:uniform(3) of - 1 -> list_to_atom(integer_to_list($\s+random:uniform(94))++"rnd"); - 2 -> random:uniform(); - 3 -> random:uniform(50)-37 + case rand:uniform(3) of + 1 -> list_to_atom(integer_to_list($\s+rand:uniform(94))++"rnd"); + 2 -> rand:uniform(); + 3 -> rand:uniform(50)-37 end. |