aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/rand_SUITE.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-02-05 12:32:07 +0100
committerHans Bolinder <[email protected]>2018-02-06 14:40:54 +0100
commit16cb4f9c59142b4e82f1a2ccbcc904be7dfdee4c (patch)
tree0585367b4f76b4ac5f253a2378c52c0c70a5c6e1 /lib/stdlib/test/rand_SUITE.erl
parent121681f93bec0f92a965059055f3492fc119548c (diff)
downloadotp-16cb4f9c59142b4e82f1a2ccbcc904be7dfdee4c.tar.gz
otp-16cb4f9c59142b4e82f1a2ccbcc904be7dfdee4c.tar.bz2
otp-16cb4f9c59142b4e82f1a2ccbcc904be7dfdee4c.zip
stdlib: Do not call erlang:get_stacktrace()
Diffstat (limited to 'lib/stdlib/test/rand_SUITE.erl')
-rw-r--r--lib/stdlib/test/rand_SUITE.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/stdlib/test/rand_SUITE.erl b/lib/stdlib/test/rand_SUITE.erl
index 3d3241b33d..15ae4fa2d7 100644
--- a/lib/stdlib/test/rand_SUITE.erl
+++ b/lib/stdlib/test/rand_SUITE.erl
@@ -82,9 +82,9 @@ test() ->
try
ok = ?MODULE:Test([]),
io:format("~p: ok~n", [Test])
- catch _:Reason ->
+ catch _:Reason:Stacktrace ->
io:format("Failed: ~p: ~p ~p~n",
- [Test, Reason, erlang:get_stacktrace()])
+ [Test, Reason, Stacktrace])
end
end, Tests).
@@ -98,8 +98,8 @@ seed(Config) when is_list(Config) ->
Algs = algs(),
Test = fun(Alg) ->
try seed_1(Alg)
- catch _:Reason ->
- ct:fail({Alg, Reason, erlang:get_stacktrace()})
+ catch _:Reason:Stacktrace ->
+ ct:fail({Alg, Reason, Stacktrace})
end
end,
[Test(Alg) || Alg <- Algs],
@@ -722,12 +722,12 @@ uniform_real_conv_check(M, E, Gen) ->
[["16#",integer_to_list(G,16),$\s]||G<-Gen]]),
ct:fail({neq, FF, F})
catch
- Error:Reason ->
+ Error:Reason:Stacktrace ->
ct:pal(
"~w:~p ~s: ~s~n",
[Error, Reason, rand:float2str(F),
[["16#",integer_to_list(G,16),$\s]||G<-Gen]]),
- ct:fail({Error, Reason, F, erlang:get_stacktrace()})
+ ct:fail({Error, Reason, F, Stacktrace})
end.