diff options
author | Zandra Norman <[email protected]> | 2017-01-23 17:06:48 +0100 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2017-04-21 16:13:29 +0200 |
commit | eff1ee5ebf1d767d610cd6bc059e5f4dea57d2af (patch) | |
tree | 6912a1608745b8df0470e4d54552b28080af87a4 /lib/stdlib/test/erl_internal_SUITE.erl | |
parent | 30cae2492d8d8e927d57c0dc656ee2dfbec0a70c (diff) | |
download | otp-eff1ee5ebf1d767d610cd6bc059e5f4dea57d2af.tar.gz otp-eff1ee5ebf1d767d610cd6bc059e5f4dea57d2af.tar.bz2 otp-eff1ee5ebf1d767d610cd6bc059e5f4dea57d2af.zip |
stdlib: Make gen_statem callbacks optional
Diffstat (limited to 'lib/stdlib/test/erl_internal_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/erl_internal_SUITE.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/stdlib/test/erl_internal_SUITE.erl b/lib/stdlib/test/erl_internal_SUITE.erl index bfa48de6b7..e60c202a55 100644 --- a/lib/stdlib/test/erl_internal_SUITE.erl +++ b/lib/stdlib/test/erl_internal_SUITE.erl @@ -60,7 +60,7 @@ end_per_testcase(_Case, _Config) -> %% Check that the behaviour callbacks are correctly defined. behav(_) -> Modules = [application, gen_server, gen_fsm, gen_event, - supervisor_bridge, supervisor], + gen_statem, supervisor_bridge, supervisor], lists:foreach(fun check_behav/1, Modules). check_behav(Module) -> @@ -89,6 +89,10 @@ callbacks(gen_event) -> [{init,1}, {handle_event,2}, {handle_call,2}, {handle_info,2}, {terminate,2}, {code_change,3}, {format_status,2}]; +callbacks(gen_statem) -> + [{init, 1}, {callback_mode, 0}, {state_name, 3}, + {handle_event, 4}, {terminate, 3}, {code_change, 4}, + {format_status, 2}]; callbacks(supervisor_bridge) -> [{init,1}, {terminate,2}]; callbacks(supervisor) -> @@ -102,6 +106,9 @@ optional_callbacks(gen_fsm) -> [{format_status,2}]; optional_callbacks(gen_event) -> [{format_status,2}]; +optional_callbacks(gen_statem) -> + [{format_status, 2}, {state_name, 3}, + {handle_event, 4}, {terminate, 3}, {code_change, 4}]; optional_callbacks(supervisor_bridge) -> []; optional_callbacks(supervisor) -> |