1
0
mirror of https://github.com/ubf/ubf.git synced 2026-04-16 09:45:11 +00:00

Cleanup contract drivers' decoder callback

This commit is contained in:
Joseph Wayne Norton
2012-09-23 16:17:50 +09:00
parent 388220bfe6
commit ce139ec399
2 changed files with 3 additions and 3 deletions

View File

@@ -33,8 +33,8 @@
-type contract() :: module().
-type options() :: list(term()).
-type parsed_options() :: term().
-type cont_init() :: {init,Rest::term(),Extras::term()} | {more,More::fun()}.
-type cont_done() :: {done,Term::term(),Rest::term(),Extras::term()} | {more,More::fun()}.
-type cont_init() :: {init,Rest::term(),Extras::term()} | {more,More::term()}.
-type cont_done() :: {done,Term::term(),Rest::term(),Extras::term()} | {more,More::term()}.
-type io() :: any().
-callback start(contract()) -> pid().

View File

@@ -64,7 +64,7 @@ prop_ubf_gen_any() ->
?FORALL(X, qc_gen:qc_any(),
begin
UBF = ubf:encode(X),
{ok, Y, ""} = ubf:decode(UBF),
{done, Y, "", undefined} = ubf:decode(UBF),
Res = X =:= Y,
?WHENFAIL(io:format("~n~p:~p ~p -> ~p -> ~p~n",[?FILE, ?LINE, X, UBF, Y]), Res)
end).