aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/op_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-12-09 15:04:28 +0100
committerBjörn Gustavsson <[email protected]>2015-12-11 14:37:46 +0100
commit71ddd8c1aba0478fe5aa07bdc8f9e6a86515bb11 (patch)
tree83a6fbd1c8bb8c06c03c8a1a4bb8ab1adb770ea0 /erts/emulator/test/op_SUITE.erl
parent80757f9491c72ee262a5910e0b3b02e95b1e5f2a (diff)
downloadotp-71ddd8c1aba0478fe5aa07bdc8f9e6a86515bb11.tar.gz
otp-71ddd8c1aba0478fe5aa07bdc8f9e6a86515bb11.tar.bz2
otp-71ddd8c1aba0478fe5aa07bdc8f9e6a86515bb11.zip
Emulator test suite: Replace use of 'random' with 'rand'
Diffstat (limited to 'erts/emulator/test/op_SUITE.erl')
-rw-r--r--erts/emulator/test/op_SUITE.erl23
1 files changed, 12 insertions, 11 deletions
diff --git a/erts/emulator/test/op_SUITE.erl b/erts/emulator/test/op_SUITE.erl
index 6eda78a57b..65a5a4c505 100644
--- a/erts/emulator/test/op_SUITE.erl
+++ b/erts/emulator/test/op_SUITE.erl
@@ -97,10 +97,11 @@ relop_simple(Config) when is_list(Config) ->
lists:foreach(fun({A,B}) -> relop_simple_do(A,B) end,
Combos),
- repeat(fun() -> Size = random:uniform(100),
- Rnd1 = make_rand_term(Size),
- {Rnd2,0} = clone_and_mutate(Rnd1, random:uniform(Size)),
- relop_simple_do(Rnd1,Rnd2)
+ repeat(fun() ->
+ Size = rand:uniform(100),
+ Rnd1 = make_rand_term(Size),
+ {Rnd2,0} = clone_and_mutate(Rnd1, rand:uniform(Size)),
+ relop_simple_do(Rnd1,Rnd2)
end,
1000),
ok.
@@ -158,7 +159,7 @@ cmp_emu(A,B) ->
make_rand_term(1) ->
make_rand_term_single();
make_rand_term(Arity) ->
- case random:uniform(3) of
+ case rand:uniform(3) of
1 ->
make_rand_list(Arity);
2 ->
@@ -169,17 +170,17 @@ make_rand_term(Arity) ->
end.
make_rand_term_single() ->
- Range = 1 bsl random:uniform(200),
- case random:uniform(12) of
+ Range = 1 bsl rand:uniform(200),
+ case rand:uniform(12) of
1 -> random;
2 -> uniform;
- 3 -> random:uniform(Range) - (Range div 2);
- 4 -> Range * (random:uniform() - 0.5);
+ 3 -> rand:uniform(Range) - (Range div 2);
+ 4 -> Range * (rand:uniform() - 0.5);
5 -> 0;
6 -> 0.0;
7 -> make_ref();
8 -> self();
- 9 -> term_to_binary(random:uniform(Range));
+ 9 -> term_to_binary(rand:uniform(Range));
10 -> fun(X) -> X*Range end;
11 -> fun(X) -> X/Range end;
12 -> []
@@ -188,7 +189,7 @@ make_rand_term_single() ->
make_rand_term_rand_size(1) ->
{make_rand_term(1), 0};
make_rand_term_rand_size(MaxArity) ->
- Arity = random:uniform(MaxArity-1),
+ Arity = rand:uniform(MaxArity-1),
{make_rand_term(Arity), MaxArity-Arity}.
make_rand_list(0) -> [];