diff options
author | Mikael Pettersson <[email protected]> | 2016-12-19 11:17:05 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-12-20 14:42:20 +0100 |
commit | ca7e946af9c2fdc86c1c74259ee7b6881c5aec1e (patch) | |
tree | 84f93ba851e22ba78654d1bc30b5dd1ae0108644 /erts/emulator/test/system_info_SUITE.erl | |
parent | 8362491325db87bd7d561399f8ef8c849df22d33 (diff) | |
download | otp-ca7e946af9c2fdc86c1c74259ee7b6881c5aec1e.tar.gz otp-ca7e946af9c2fdc86c1c74259ee7b6881c5aec1e.tar.bz2 otp-ca7e946af9c2fdc86c1c74259ee7b6881c5aec1e.zip |
erts: add erlang:system_info(atom_count)
Diffstat (limited to 'erts/emulator/test/system_info_SUITE.erl')
-rw-r--r-- | erts/emulator/test/system_info_SUITE.erl | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/erts/emulator/test/system_info_SUITE.erl b/erts/emulator/test/system_info_SUITE.erl index 3d9e74472b..6a772bf7c9 100644 --- a/erts/emulator/test/system_info_SUITE.erl +++ b/erts/emulator/test/system_info_SUITE.erl @@ -36,7 +36,8 @@ -export([all/0, suite/0]). -export([process_count/1, system_version/1, misc_smoke_tests/1, - heap_size/1, wordsize/1, memory/1, ets_limit/1, atom_limit/1]). + heap_size/1, wordsize/1, memory/1, ets_limit/1, atom_limit/1, + atom_count/1]). suite() -> [{ct_hooks,[ts_install_cth]}, @@ -44,7 +45,7 @@ suite() -> all() -> [process_count, system_version, misc_smoke_tests, - heap_size, wordsize, memory, ets_limit, atom_limit]. + heap_size, wordsize, memory, ets_limit, atom_limit, atom_count]. %%% %%% The test cases ------------------------------------------------------------- @@ -550,3 +551,13 @@ get_atom_limit(Config, AtomsMax) -> end, stop_node(Node), Res. + +%% Verify that system_info(atom_count) works. +atom_count(Config) when is_list(Config) -> + Limit = erlang:system_info(atom_limit), + Count1 = erlang:system_info(atom_count), + list_to_atom(integer_to_list(erlang:unique_integer())), + Count2 = erlang:system_info(atom_count), + true = Limit >= Count2, + true = Count2 > Count1, + ok. |