Skip to content

Commit

Permalink
Wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kuenishi committed Sep 12, 2023
1 parent 24c5a48 commit f02c3d5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions test/prop_msgpack.erl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ prop_test() ->
end).

prop_pack() ->
?FORALL(Term, msgpack_object(),
?FORALL(Term, msgpack_term(),
begin
Bin = msgpack:pack(Term),
is_binary(Bin)
Expand All @@ -26,6 +26,18 @@ boolean(_) -> true.
%%%%%%%%%%%%%%%%%%
%%% Generators %%%
%%%%%%%%%%%%%%%%%%
msgpack_object() -> term().
msgpack_term() ->
frequency(
[
{10, integer()},
{10, float()},
{10, boolean()},
{10, binary()},
{10, utf8()},
{2, ?LAZY(list(msgpack_term()))},
{1, ?LAZY(map(msgpack_term(), msgpack_term()))}
]).


mytype() ->
term().

0 comments on commit f02c3d5

Please sign in to comment.