diff options
author | Micael Karlberg <[email protected]> | 2019-07-17 11:32:07 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-07-17 11:54:17 +0200 |
commit | 62b0a65b27e16c3d56df45760fb4878cf2ede5f9 (patch) | |
tree | fc61dade195f53c5de5bdc069dbc6f96bf45d078 /lib/megaco/test/megaco_test_generator.erl | |
parent | b4730a1efd315d7b4e410f34a2b66cb7bfd77889 (diff) | |
download | otp-62b0a65b27e16c3d56df45760fb4878cf2ede5f9.tar.gz otp-62b0a65b27e16c3d56df45760fb4878cf2ede5f9.tar.bz2 otp-62b0a65b27e16c3d56df45760fb4878cf2ede5f9.zip |
[megaco|test] Reworked the test generator behaviour
Reworked the megaco test generator (megaco_test_generator) behaviour
to remove compiler warnings.
Diffstat (limited to 'lib/megaco/test/megaco_test_generator.erl')
-rw-r--r-- | lib/megaco/test/megaco_test_generator.erl | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/lib/megaco/test/megaco_test_generator.erl b/lib/megaco/test/megaco_test_generator.erl index f922afa37d..8ea7f5ddf7 100644 --- a/lib/megaco/test/megaco_test_generator.erl +++ b/lib/megaco/test/megaco_test_generator.erl @@ -47,7 +47,6 @@ print/3, print/4 ]). --export([behaviour_info/1]). %% Internal exports -export([start/4]). @@ -91,15 +90,32 @@ %%% API %%%========================================================================= -behaviour_info(callbacks) -> - [ - {init, 1}, - {handle_parse, 2}, - {handle_exec, 2}, - {terminate, 2} - ]; -behaviour_info(_Other) -> - undefined. +-callback init(Args) -> {ok, State} | {error, Reason} when + Args :: term(), + State :: term(), + Reason :: term(). + +-callback handle_parse(Instruction, State) -> + {ok, NewInstruction, NewState} | + {error, Reason} when + Instruction :: term(), + State :: term(), + NewInstruction :: term(), + NewState :: term(), + Reason :: term(). + +-callback handle_exec(Instruction, State) -> + {ok, NewState} | + {error, Reason} when + Instruction :: term(), + State :: term(), + NewState :: term(), + Reason :: term(). + +-callback terminate(Reason, State) -> + megaco:void() when + Reason :: term(), + State :: term(). %%---------------------------------------------------------------------- |