anchor.diff:      end.
   
   
  --spec(eunit_is_used(FileName::filename(),  SearchPaths::[dir()]) ->
  -	     boolean()).
  -eunit_is_used(FileName, SearchPaths) ->
  -    Dir = filename:dirname(FileName),
  -    DefaultIncl1 = [".","..", "../hrl", "../incl", "../inc", "../include"],
  -    DefaultIncl2 = [filename:join(Dir, X) || X <-DefaultIncl1],
  -    NewSearchPaths= SearchPaths++DefaultIncl2,
  -    case refac_epp:parse_file(FileName, NewSearchPaths, [])  of 
  -	{ok, _, {MDefs, _MUses}} -> 
  -	   lists:any(fun({{_,Name}, _Def}) -> Name=='EUNIT_HRL' end, MDefs);
  -	_ ->
  -	     true    %% rather conservative here.
  -    end.
  +test_framework_used(FileName) ->
  +    case refac_epp_dodger:parse_file(FileName, []) of 
  +	{ok, Forms}->
  +	    Strs =lists:flatmap(fun(F) ->
  +					case refac_syntax:type(F) of 
  +					    attribute ->
  +						Name = refac_syntax:attribute_name(F),
  +						Args = refac_syntax:attribute_arguments(F),
  +						case refac_syntax:type(Name) of 
  +						    atom-> 
  +							AName = refac_syntax:atom_value(Name),
  +							case (AName==include) orelse (AName==include_lib) of
  +							    true ->
  +								lists:flatmap(fun(A)-> case A of 
  +											   {string, _, Str} -> [Str];
  +											   _ -> []
  +										       end
  +									      end, Args);
  +							   _ -> []
  +						       end;
  +						   _ -> []
  +					       end;
  +					   _ -> []
  +				       end
  +			       end,Forms),
  +	   Eunit = lists:any(fun(S) -> lists:suffix("eunit.hrl", S) end,Strs),
  +	   EQC = lists:any(fun(S) -> lists:suffix("eqc.hrl", S) end, Strs),
  +	   EQC_STATEM  =lists:any(fun(S) -> lists:suffix("eqc_statem.hrl", S) end, Strs),
  +	   TestSever = lists:suffix(FileName, "_SUITE.erl") and 
  +	       lists:any(fun(S) -> lists:suffix("test_server.hrl", S) end, Strs),
  +	    CommonTest= lists:suffix(FileName, "_SUITE.erl") and 
  +		lists:any(fun(S) -> lists:suffix("ct.hrl", S) end, Strs),
  +	    [{eunit, Eunit}, {eqc, EQC}, {eqc_statem, EQC_STATEM}, {testserver, TestSever}, {commontest, CommonTest}];
  +	_ -> [{eunit, false}, {eqc, false}, {eqc_statem, false}, {testserver, false}, {commontest, false}]
  +    end.
  +   
  +    
   	
   is_whitespace_or_comment({whitespace, _, _}) ->
       true;
  
positive.code: 	 build_scc_callgraph/1,build_callercallee_callgraph/1, has_side_effect/3,
           callback_funs/1,auto_imported_bifs/0, called_funs/3, file_format/1]).
  
  -export([eunit_is_used/2]).
  -export([analyze_free_vars/1]).
  
  -export([update_var_define_locations/1]).
  
negative.code: 
  -spec(auto_imported_bifs()->[{atom(), atom(), integer()}]).
  auto_imported_bifs() ->
      [{abs, 1},           {apply, 2},          {apply, 3}, {atom_to_list, 1}, {binary_to_list, 1},
       {binary_to_list, 3}, {binary_to_term, 1}, {check_process_code, 2},
       {concat_binary, 1},  { data, 3},          {delete_module, 1}, {disconnect_node, 1},
       {element, 2},        {erase, 0},          {erase, 1}, {exit, 1}, {exit, 2}, {float, 1},
       {float_to_list, 1},  {garbage_collect, 1},{garbage_collect, 0}, {get, 0},
       {get, 1},            {get_keys, 1},       {group_leader, 0}, {group_leader, 2}, {halt, 0},
       {halt, 1},           {hd, 1},             {integer_to_list, 1}, {iolist_to_binary, 1},
       {iolist_size, 1},    {is_atom, 1},        {is_binary, 1}, {is_boolean, 1},
       {is_float, 1},       {is_function, 1},    {is_function, 2}, {is_integer, 1},
       {is_list, 1},        {is_number, 1},      {is_pid, 1}, {is_port, 1},
       {is_process_alive,1},{is_record, 2},      {is_record, 3}, {is_reference, 1},
       {is_tuple, 1},       {length, 1},         {link, 1}, {list_to_atom, 1},
       {list_to_binary, 1}, {list_to_existing_atom, 1}, {list_to_float, 1},
       {list_to_integer, 1},{list_to_pid, 1},    {list_to_tuple, 1},
       {load_module, 2},    {make_ref, 0},       {module_loaded, 1}, {monitor_node, 2},
       {node, 0},           {node, 1},           {nodes, 0}, {nodes, 1}, {now, 0}, {open_port, 2},
       {pid_to_list, 1},    {port_close, 1},     { port_command, 2}, { port_connect, 2},
       { port_control, 3},  { pre_loaded, 0},    {process_flag, 2}, {process_flag, 3},
       {process_info, 1},   {process_info, 2},   {processes, 0}, {purge_module, 1},
       {put, 2},            {register, 2},       {registered, 0}, {round, 1}, {self, 0},
       {setelement, 3},     {size, 1},           {spawn, 1}, {spawn, 2}, {spawn, 3},
       {spawn, 4},          {spawn_link, 1},     {spawn_link, 2}, {spawn_link, 3},
       {spawn_link, 4},     {spawn_opt, 2},      {spawn_opt, 3}, {spawn_opt, 4},
       {spawn_opt, 5},      {aplit_binary, 2},   {statistics, 1}, {term_to_binary, 1},
       {term_to_binary, 2}, {throw, 1},          {time, 1}, {tl, 1}, {trunc, 1},
       {unregister, 1},     {unregister, 1},     {tuple_to_list, 1}, {unlink, 1},
       {whereis, 1}].
  
  
  %% =====================================================================
  