anchor.diff:      Passed = length(Tests).
   
   port_test()->
  +    Port = open_port({spawn, "ruby ../test/crosslang.rb"}, [binary]),
       Tests = test_data(),
       {[Tests],<<>>} = msgpack:unpack(msgpack:pack([Tests])),
  -    Port = open_port({spawn, "ruby ../test/crosslang.rb"}, [binary]),
       true = port_command(Port, msgpack:pack(Tests) ),
       receive
   	{Port, {data, Data}}->  {Tests, <<>>}=msgpack:unpack(Data)
  
positive.code:     << 16#D3:8, N:64/big-signed-integer-unit:1 >>.
  
  % float : erlang's float is always IEEE 754 64bit format.
  %pack_float(F) when is_float(F)->
  %    << 16#CA:8, F:32/big-float-unit:1 >>.
  %    pack_double(F).
  % double
  
negative.code: 	<<2#1000:4, L:4, Rest/binary>> ->            unpack_map_(Rest, L, []);   % map
  	
  % Incomplete / invalid data
  	<<F:16, _/binary>> when F==16#CA; F==16#CB; F==16#CC;
  				F==16#CD; F==16#CE; F==16#CF;
  				F==16#D0; F==16#D1; F==16#D2;
  				F==16#D3; F==16#DA; F==16#DB;
  				F==16#DC; F==16#DD; F==16#DE;
  				F==16#DF ->
  	    throw(short);
  	<<F:16, _/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);
  	_ ->
  	    throw(short) % or unknown/badarg?
      end;
  unpack_(<<>>)->                    throw(short);
  unpack_(<<2#101:3, _/binary>>) ->  throw(short).
  
  % ===== test codes ===== %
  -include_lib("eunit/include/eunit.hrl").
  -ifdef(EUNIT).
  
  compare_all([], [])-> ok;
  compare_all([],  R)-> {toomuchrhs, R};
  compare_all(L,  [])-> {toomuchlhs, L};
  compare_all([LH|LTL], [RH|RTL]) ->
      ?assertEqual(LH, RH),
      compare_all(LTL, RTL).
  