anchor.diff:  %% # xref/1
   %%
   %% Ensure that no function in our application calls an undefined function
  -%% or one in an application we haven't specified as a dependency. (Almost.)
  +%% or one in an application we haven't declared as a dependency. (Almost.)
   %% ===========================================================================
   
   xref(Config) ->
       App = fetch(app, Config),
  -    Mods = fetch(modules, App),
  +    Mods = fetch(modules, App),  %% modules listed in the app file
  +
  +    %% List of application names extracted from runtime_dependencies.
  +    Deps = lists:map(fun unversion/1, fetch(runtime_dependencies, App)),
   
       {ok, XRef} = xref:start(make_name(xref_test_name)),
       ok = xref:set_default(XRef, [{verbose, false}, {warnings, false}]),
  
positive.code: %%
  %% %CopyrightBegin%
  %%
  %% Copyright Ericsson AB 2010-2013. All Rights Reserved.
  %%
  %% The contents of this file are subject to the Erlang Public License,
  %% Version 1.1, (the "License"); you may not use this file except in
  
negative.code:                        [?APP, erts | fetch(applications, App)]),
  
      {ok, Undefs} = xref:analyze(XRef, undefined_function_calls),
      {ok, CTdeps} = xref:analyze(XRef, {module_call, ?COMPILER_MODULES}),
      {ok, RTdeps} = xref:analyze(XRef, {module_call, Mods}),
  
      xref:stop(XRef),
  
  