anchor.diff:  -export([verify_refs/1]).
   -export([reformat_names/1]).
   -export([resolve_refs/1]).
  +-export([enumerate_msg_fields/1]).
   -export([fetch_imports/1]).
   
   
  
positive.code: fetch_ref(Name, [{{msg,Name}=Key,_} | _])  -> Key;
  fetch_ref(Name, [_ | T])                   -> fetch_ref(Name, T).
  
  %% `Defs' is expected to be parsed.
  fetch_imports(Defs) ->
      [Path || {import,Path} <- Defs].
  
negative.code:         lists:sort(
            resolve_refs(reformat_names(flatten_defs(absolutify_names(Elems))))).
  
  enumerates_msg_fields_test() ->
      {ok, Elems} = parse_lines(["message m1 {"
                                 "  message m2 { required uint32 x = 1; }",
                                 "  enum    e1 { a = 17; }",
                                 "  required m2     y = 11;",
                                 "  required e1     z = 12;",
                                 "}"]),
      [{{enum,m1_e1}, _},
       {{msg,m1},     [#field{name=y, fnum=11, rnum=2},
                       #field{name=z, fnum=12, rnum=3}]},
       {{msg,m1_m2},  [#field{name=x, fnum=1, rnum=2}]}] =
          lists:sort(
            enumerate_msg_fields(
              resolve_refs(
                reformat_names(flatten_defs(absolutify_names(Elems)))))).
  
  
  fetches_imports_test() ->
      {ok, Elems} = parse_lines(["package p1;"
                                 "import \"a/b/c.proto\";",
  