Skip to content

Commit

Permalink
test: add a test of erlang:statistics(async_queue)
Browse files Browse the repository at this point in the history
Tests that statistics(async_queue) is callable.
  • Loading branch information
Etsukata committed Mar 28, 2014
1 parent c8ea819 commit fcb9bd0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions erts/emulator/test/statistics_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
run_queue_one/1,
scheduler_wall_time/1,
reductions/1, reductions_big/1, garbage_collection/1, io/1,
badarg/1]).
async_queue/1, badarg/1]).

%% Internal exports.

Expand All @@ -53,7 +53,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[{group, wall_clock}, {group, runtime}, reductions,
reductions_big, {group, run_queue}, scheduler_wall_time,
garbage_collection, io, badarg].
garbage_collection, io, async_queue, badarg].

groups() ->
[{wall_clock, [],
Expand Down Expand Up @@ -399,6 +399,11 @@ io(Config) when is_list(Config) ->
{{input,In},{output,Out}} when is_integer(In), is_integer(Out) -> ok
end.

async_queue(Config) when is_list(Config) ->
case statistics(async_queue) of
N when N >= 0 -> ok
end.

badarg(doc) ->
"Tests that some illegal arguments to statistics fails.";
badarg(Config) when is_list(Config) ->
Expand Down

0 comments on commit fcb9bd0

Please sign in to comment.