anchor.diff:      {Term, <<>>}=msgpack:unpack(OrigBin);
   test_p(I,_,OrigBin,Len) when I < Len->
       <<Bin:I/binary, _/binary>> = OrigBin,
  -    case msgpack:unpack(Bin) of
  -	{more, N} when not is_integer(N) ->
  -	    ?assertEqual(undefined, N);
  -	{more, N} ->
  -	    ?assert( N < Len )
  -    end.
  +    ?assertEqual({error,short}, msgpack:unpack(Bin)).
   
   partial_test()-> % error handling test.
       Term = lists:seq(0, 45),
  
positive.code: 	     42
  	    ],
      Port = open_port({spawn, "ruby testcase_generator.rb"}, [binary]),
      receive
  	{Port, {data, Data}}->
  	    compare_all(Tests, msgpack:unpack_all(Data))
      after 1024-> ?assert(false)   end,
      port_close(Port).
  
  test_([]) -> 0;
  test_([Before|Rest])->
      Pack = msgpack:pack(Before),
      {After, <<>>} = msgpack:unpack( Pack ),
      ?assertEqual(Before, After),
      1+test_(Rest).
  
  other_test()->
      {more,1}=msgpack:unpack(<<>>).
  
  benchmark_test()->
      Data=[test_data() || _ <- lists:seq(0, 10000)],
  
negative.code: 	<<2#1000:4, L:4, Rest/binary>> ->            unpack_map_(Rest, L, []);   % map
  	
  % Incomplete / invalid data
  %	<<_:16/integer, _/binary>>
  	_ -> throw(short)
  %% 	<<16#CA, _/binary>> -> {more, 4-byte_size(Rest)};
  %% 	<<16#CB, Rest/binary>> -> {more, 8-byte_size(Rest)};
  %% 	<<16#CC>> ->              {more, 1};
  %% 	<<16#CD, Rest/binary>> -> {more, 2-byte_size(Rest)};
  %% 	<<16#CE, Rest/binary>> -> {more, 4-byte_size(Rest)};
  %% 	<<16#CF, Rest/binary>> -> {more, 8-byte_size(Rest)};
  %% 	<<16#D0>> ->              {more, 1};
  %% 	<<16#D1, Rest/binary>> -> {more, 2-byte_size(Rest)};
  %% 	<<16#D2, Rest/binary>> -> {more, 4-byte_size(Rest)};
  %% 	<<16#D3, Rest/binary>> -> {more, 8-byte_size(Rest)};
  %% 	<<16#DA, Rest/binary>> -> {more, 16-byte_size(Rest)};
  %% 	<<16#DB, Rest/binary>> -> {more, 32-byte_size(Rest)};
  %% 	<<16#DC, Rest/binary>> -> {more, 2-byte_size(Rest)};
  %% 	<<16#DD, Rest/binary>> -> {more, 4-byte_size(Rest)};
  %% 	<<16#DE, Rest/binary>> -> {more, 2-byte_size(Rest)};
  %% 	<<16#DF, Rest/binary>> -> {more, 4-byte_size(Rest)};
  %% 	<<2#101:3, L:5, Rest/binary>> ->  throw(short); % {more, L-byte_size(Rest)};
  
  %% 	<<>> ->   throw(short); %               {more, 1};
  %% 	<<2#101:3, _/binary>> -> {more, undefined};
  %% 	<<F:8, Rest/binary>> when F==16#C1;
  %% 				  F==16#C7; F==16#C8; F==16#C9; F==16#D5;
  %% 				  F==16#D6; F==16#D7; F==16#D8; F==16#D9->
  %% 	    throw({badarg, <<F, Rest/binary>>});
  %	Other ->
  %	    throw({unknown, Other})
      end.
  
  % ===== test codes ===== %
  -include_lib("eunit/include/eunit.hrl").
  