anchor.diff:      end.
   
   % ===== internal APIs ===== %
  +
  +% pack them all
  +-spec pack_(msgpack_term()) -> binary() | no_return().
  +pack_(I) when is_integer(I) andalso I < 0 ->
  +    pack_int_(I);
  +pack_(I) when is_integer(I) ->
  +    pack_uint_(I);
  +pack_(F) when is_float(F) ->
  +    pack_double(F);
  +pack_(nil) ->
  +    << 16#C0:8 >>;
  +pack_(true) ->
  +    << 16#C3:8 >>;
  +pack_(false) ->
  +    << 16#C2:8 >>;
  +pack_(Bin) when is_binary(Bin) ->
  +    pack_raw(Bin);
  +pack_(List)  when is_list(List) ->
  +    pack_array(List);
  +pack_({Map}) when is_list(Map) ->
  +    pack_map(Map);
  +pack_(Map) when is_tuple(Map), element(1,Map)=:=dict ->
  +    pack_map(dict:to_list(Map));
  +pack_(_Other) ->
  +    throw({error, undefined}).
   
   % positive fixnum
   pack_uint_(N) when N < 128 ->
  
positive.code:     {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.
  
  partial_test()-> % error handling test.
      Term = lists:seq(0, 45),
  
negative.code: 	     42
  	    ],
      Port = open_port({spawn, "ruby testcase_generator.rb"}, [binary]),
      timer:sleep(1),
      receive
  	{Port, {data, Data}}->
  	    compare_all(Tests, msgpack:unpack_all(Data))
      after 1024-> ?assert(false)   end,
      port_close(Port).
  
  other_test()->
      ?assertEqual({error,short},msgpack:unpack(<<>>)).
  
  benchmark_test()->
      Data=[test_data() || _ <- lists:seq(0, 10000)],
  