anchor.diff:  	 init_per_suite/1,end_per_suite/1]).
   -export([undefined_functions/1,deprecated_not_in_obsolete/1,
   	 obsolete_but_not_deprecated/1,call_to_deprecated/1,
  -         call_to_size_1/1,strong_components/1,
  +         call_to_size_1/1,call_to_now_0/1,strong_components/1,
   	 erl_file_encoding/1,xml_file_encoding/1,runtime_dependencies/1]).
   
   -include_lib("test_server/include/test_server.hrl").
  
positive.code: all() -> 
      [undefined_functions, deprecated_not_in_obsolete,
       obsolete_but_not_deprecated, call_to_deprecated,
       call_to_size_1, strong_components,
       erl_file_encoding, xml_file_encoding,
       runtime_dependencies].
  
  
negative.code:     {comment,integer_to_list(length(DeprecatedCalls))++" calls to deprecated functions"}.
  
  call_to_size_1(Config) when is_list(Config) ->
      %% Applications that do not call erlang:size/1:
      Apps = [asn1,compiler,debugger,kernel,observer,parsetools,
  	    runtime_tools,stdlib,tools,webtool],
      not_recommended_calls(Config, Apps, {erlang,size,1}).
  
  call_to_now_0(Config) when is_list(Config) ->
      %% Applications that do not call erlang:now/1:
      Apps = [asn1,common_test,compiler,debugger,dialyzer,
  	    gs,kernel,mnesia,observer,parsetools,reltool,
  	    runtime_tools,sasl,stdlib,syntax_tools,
  	    test_server,tools,webtool],
      not_recommended_calls(Config, Apps, {erlang,now,0}).
  
  not_recommended_calls(Config, Apps, MFA) ->
      Server = ?config(xref_server, Config),
  
      Fs = [MFA],
  
      Q1 = io_lib:format("E || ~p : Fun", [Fs]),
      {ok,AllCallsToMFA} = xref:q(Server, lists:flatten(Q1)),
  
      Q2 = io_lib:format("E | ~p : App || ~p : Fun", [Apps,Fs]),
      {ok,CallsToMFA} = xref:q(Server, lists:flatten(Q2)),
  
      case CallsToMFA of
  	[] -> 
              ok;
  	_ ->
              io:format("These calls are not allowed:\n"),
  	    foreach(fun ({MFA1,MFA2}) ->
  			    io:format("~s calls non-recommended ~s",
  				      [format_mfa(MFA1),format_mfa(MFA2)])
  		    end, CallsToMFA)
      end,
  
      %% Enumerate calls to MFA from other applications than
      %% the ones known not to call MFA:
      case AllCallsToMFA--CallsToMFA of
          [] ->
              ok;
          Calls ->
              io:format("~n~nThese calls are allowed for now:\n"),
              foreach(fun ({MFA1,MFA2}) ->
                              io:format("~s calls non-recommended ~s",
                                        [format_mfa(MFA1),format_mfa(MFA2)])
                      end, Calls)
      end,
      case CallsToMFA of
  	[] -> 
              ok;
  	_ ->
  	    ?t:fail({length(CallsToMFA),calls_to_size_1})
      end.
  
  strong_components(Config) when is_list(Config) ->
  