diff options
author | John Högberg <[email protected]> | 2018-03-21 09:29:22 +0100 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-03-21 12:39:09 +0100 |
commit | f5af4ec3aec18b7237c11ec6c8b7dd9367002d37 (patch) | |
tree | aa6ffecc16533fba2800d74f97bad4929c178340 /erts/emulator/test | |
parent | 5fcb8fe88e26938537de72462dc77e91a450ee57 (diff) | |
download | otp-f5af4ec3aec18b7237c11ec6c8b7dd9367002d37.tar.gz otp-f5af4ec3aec18b7237c11ec6c8b7dd9367002d37.tar.bz2 otp-f5af4ec3aec18b7237c11ec6c8b7dd9367002d37.zip |
Add an option to ?MODULE:module_info/1 for listing NIFs
Diffstat (limited to 'erts/emulator/test')
-rw-r--r-- | erts/emulator/test/module_info_SUITE.erl | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/erts/emulator/test/module_info_SUITE.erl b/erts/emulator/test/module_info_SUITE.erl index 0341e63f13..46a3bba732 100644 --- a/erts/emulator/test/module_info_SUITE.erl +++ b/erts/emulator/test/module_info_SUITE.erl @@ -23,7 +23,7 @@ -include_lib("common_test/include/ct.hrl"). -export([all/0, suite/0, - exports/1,functions/1,deleted/1,native/1,info/1]). + exports/1,functions/1,deleted/1,native/1,info/1,nifs/1]). %%-compile(native). @@ -38,7 +38,7 @@ all() -> modules(). modules() -> - [exports, functions, deleted, native, info]. + [exports, functions, deleted, native, info, nifs]. %% Should return all functions exported from this module. (local) all_exported() -> @@ -69,6 +69,17 @@ functions(Config) when is_list(Config) -> All = lists:sort(?MODULE:module_info(functions)), ok. +nifs(Config) when is_list(Config) -> + [] = ?MODULE:module_info(nifs), + + %% erl_tracer is guaranteed to be present and contain these NIFs + TraceNIFs = erl_tracer:module_info(nifs), + true = lists:member({enabled, 3}, TraceNIFs), + true = lists:member({trace, 5}, TraceNIFs), + 2 = length(TraceNIFs), + + ok. + %% Test that deleted modules cause badarg deleted(Config) when is_list(Config) -> Data = proplists:get_value(data_dir, Config), |