diff options
author | Raimo Niskanen <[email protected]> | 2016-04-21 15:58:52 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2016-04-21 15:58:52 +0200 |
commit | 26b3c7d60d52d8a7be006b06d856bb0f7276e77a (patch) | |
tree | 82fe6796d1139babe79073d7c4e392d7d7a5dc90 /lib/stdlib/test | |
parent | 2977fbc6b658b0d664f7d3b36ecf8ca9e897aaa3 (diff) | |
download | otp-26b3c7d60d52d8a7be006b06d856bb0f7276e77a.tar.gz otp-26b3c7d60d52d8a7be006b06d856bb0f7276e77a.tar.bz2 otp-26b3c7d60d52d8a7be006b06d856bb0f7276e77a.zip |
Modify code_change/4 to return CallbackMode
Also move check of non-atom states in callback mode
state_functions to where the state function is called.
This gives homogenous diagnostics for state functions,
code_change/4 and system_replace_state StateFun.
Irregularities pointed out by James Fish.
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r-- | lib/stdlib/test/gen_statem_SUITE.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/stdlib/test/gen_statem_SUITE.erl b/lib/stdlib/test/gen_statem_SUITE.erl index 27fb7d9650..3deb5fd986 100644 --- a/lib/stdlib/test/gen_statem_SUITE.erl +++ b/lib/stdlib/test/gen_statem_SUITE.erl @@ -637,9 +637,9 @@ code_change(Config) -> {ok,Pid} = gen_statem:start(?MODULE, start_arg(Config, []), []), {idle,data} = sys:get_state(Pid), sys:suspend(Pid), - sys:change_code(Pid, ?MODULE, old_vsn, extra), + sys:change_code(Pid, ?MODULE, old_vsn, state_functions), sys:resume(Pid), - {idle,{old_vsn,data,extra}} = sys:get_state(Pid), + {idle,{old_vsn,data,state_functions}} = sys:get_state(Pid), stop_it(Pid). call_format_status(Config) -> @@ -1561,8 +1561,8 @@ wrap_result(Result) -> -code_change(OldVsn, State, Data, Extra) -> - {ok,State,{OldVsn,Data,Extra}}. +code_change(OldVsn, State, Data, CallbackMode) -> + {CallbackMode,State,{OldVsn,Data,CallbackMode}}. format_status(terminate, [_Pdict,State,Data]) -> {formatted,State,Data}; |