anchor.diff:      [ ?_assertEqual({<<"example">>, <<>>}, decode_dname(DataBin, MsgBin))
         || {MsgBin, DataBin} <- Cases ].
   
  -decode_dname_decode_loop_test_() ->
  +decode_dname_decode_loop_test() ->
       Bin = <<3:2, 0:14>>,
  -    ?_assertException(throw, decode_loop, decode_dname(Bin, Bin)).
  -
  -decode_dname_bad_pointer_test_() ->
  +    ?assertException(throw, decode_loop, decode_dname(Bin, Bin)).
  +
  +decode_dname_bad_pointer_test() ->
       Case = <<3:2, 42:14>>,
  -    ?_assertException(throw, bad_pointer, decode_dname(Case, Case)).
  +    ?assertException(throw, bad_pointer, decode_dname(Case, Case)).
   
   encode_dname_1_test_() ->
       Cases = [ {"example", <<7,101,120,97,109,112,108,101,0>>},
  
positive.code:     Msg = #dns_message{qc = QLen, anc = AnsLen, adc = AdsLen,
  		       questions = Qs, answers = Ans, additional = Ads},
      Bin = encode_message(Msg),
      ?_assertEqual(Msg, decode_message(Bin)).
      
  tsig_no_tsig_test() ->
      MsgBin = encode_message(#dns_message{}),
      Name = <<"name">>,
      Value = <<"value">>,
      ?_assertException(error, no_tsig, verify_tsig(MsgBin, Name, Value)).
  
  tsig_bad_key_test() ->
      MsgId = random_id(),
  
negative.code: 	     {Encoded, _NewCompMap} = encode_rrdata(0, Class, Data,
  						    gb_trees:empty()),
  	     Decoded = decode_rrdata(Class, Type, Encoded, Encoded),
  	     ?assertEqual(Data, Decoded)
  	 end
  	)
        || {Class, Type, Data} <- Cases ].
  