aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/rand_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-09-14 15:19:17 +0200
committerBjörn Gustavsson <[email protected]>2015-09-14 15:19:17 +0200
commit7e0e50bafef2b0855eba3f0111e6e141025ebf13 (patch)
tree900b142709bcffbc1b943995bee2bd0e8dbf96c7 /lib/stdlib/test/rand_SUITE.erl
parentfbf7a72deac2bc69f33bca6384104371ab9fe5be (diff)
parentd9117a4ae9e35bd1917272460d0e8a52133046d1 (diff)
downloadotp-7e0e50bafef2b0855eba3f0111e6e141025ebf13.tar.gz
otp-7e0e50bafef2b0855eba3f0111e6e141025ebf13.tar.bz2
otp-7e0e50bafef2b0855eba3f0111e6e141025ebf13.zip
Merge branch 'bjorn/cuddle-with-tests' into maint
* bjorn/cuddle-with-tests: (23 commits) rand_SUITE: Speed up basic_stats/1 base64_SUITE: Speed up roundtrip/1 lists_SUITE: Test lists:concat/2 lists_SUITE: Test lists:split/2 lists_SUITE: Add a test case for lists:prefix/2 lists_SUITE: Add hof/1 to test all high-order functions lists_SUITE: Add test for lists:takewhile/1 lists_SUITE: Run test cases in each group in parallel lists_SUITE: Test lists:keyreplace/4 lists_SUITE: Extend flatten/1 test to also test flatlength/1 lists_SUITE: Correct test of lists:flatten/2 id_transform_SUITE: Modernize test suite io_proto_SUITE: Speed up determination of default shell io_proto_SUITE: Refactor up rtnode() and friends gen_event_SUITE: Remove unnecessary sleep calls proc_lib: Improve coverage for crash/1 proc_lib_SUITE: Eliminate compiler warnings io_SUITE: Add coverage/1 to completely cover io_lib_pretty io_SUITE: Extend coverage of code for testing printable chars io_SUITE: Speed up test for bad +pc option ...
Diffstat (limited to 'lib/stdlib/test/rand_SUITE.erl')
-rw-r--r--lib/stdlib/test/rand_SUITE.erl23
1 files changed, 16 insertions, 7 deletions
diff --git a/lib/stdlib/test/rand_SUITE.erl b/lib/stdlib/test/rand_SUITE.erl
index b03caebe91..111bf620de 100644
--- a/lib/stdlib/test/rand_SUITE.erl
+++ b/lib/stdlib/test/rand_SUITE.erl
@@ -25,7 +25,9 @@
]).
-export([interval_int/1, interval_float/1, seed/1,
- api_eq/1, reference/1, basic_stats/1,
+ api_eq/1, reference/1,
+ basic_stats_uniform_1/1, basic_stats_uniform_2/1,
+ basic_stats_normal/1,
plugin/1, measure/1
]).
@@ -51,11 +53,13 @@ all() ->
[seed, interval_int, interval_float,
api_eq,
reference,
- basic_stats,
+ {group, basic_stats},
plugin, measure
].
-groups() -> [].
+groups() ->
+ [{basic_stats, [parallel],
+ [basic_stats_uniform_1, basic_stats_uniform_2, basic_stats_normal]}].
init_per_suite(Config) -> Config.
end_per_suite(_Config) -> ok.
@@ -291,14 +295,19 @@ gen(_, _, Acc) -> lists:reverse(Acc).
%% The algorithms must have good properties to begin with
%%
-basic_stats(doc) -> ["Check that the algorithms generate sound values."];
-basic_stats(suite) -> [];
-basic_stats(Config) when is_list(Config) ->
- io:format("Testing uniform~n",[]),
+%% Check that the algorithms generate sound values.
+
+basic_stats_uniform_1(Config) when is_list(Config) ->
[basic_uniform_1(?LOOP, rand:seed_s(Alg), 0.0, array:new([{default, 0}]))
|| Alg <- algs()],
+ ok.
+
+basic_stats_uniform_2(Config) when is_list(Config) ->
[basic_uniform_2(?LOOP, rand:seed_s(Alg), 0, array:new([{default, 0}]))
|| Alg <- algs()],
+ ok.
+
+basic_stats_normal(Config) when is_list(Config) ->
io:format("Testing normal~n",[]),
[basic_normal_1(?LOOP, rand:seed_s(Alg), 0, 0) || Alg <- algs()],
ok.