Skip to content

Commit 6d4151f

Browse files
committed
update ext typecode testcase to ensure correct decoded typecode
1 parent c77a1c3 commit 6d4151f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/msgpack_ext_example_tests.erl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ ext_typecode_range_test() ->
8080
Packer = fun ({thing, N}, _) ->
8181
{ok, {N, msgpack:pack(N)}}
8282
end,
83-
Unpacker = fun(_N, Bin, _) ->
84-
msgpack:unpack(Bin)
83+
Unpacker = fun(N, Bin, _) ->
84+
Result = msgpack:unpack(Bin),
85+
?assertEqual({ok, N}, Result),
86+
Result
8587
end,
8688
Opt = [{ext,{Packer,Unpacker}}],
8789
%% it should be possible to use an uncontroversial ext type code:

0 commit comments

Comments
 (0)