anchor.diff:  %% @author Jan Fajerski <fajerski@zib.de>
   %% @doc    Unit tests for db backends that fullfill src/backend_beh.erl.
   %%         just define ?TEST_DB and include this file.
  +%%         The default to determine equality of keys is == (ets with ordered_set
  +%%         uses this). If a backend only considers matching keys equal (i.e.
  +%%         =:=) the EQ macro has to defined to =:= in the file that includes
  +%%         this one.
   %% @end
   %% @version $Id$
   
   -include("scalaris.hrl").
   -include("unittest.hrl").
  +
  +%% default equality
  +-ifndef(EQ).
  +-define(EQ, ==).
  +-endif.
   
   tests_avail() ->
       [tester_put,
  
positive.code: 
  scrub_data(Data) ->
      %% Entries should be unique
      SortFun = fun(A, B) -> element(1, A) =< element(1, B) end,
      lists:usort(SortFun, [Entry || Entry <- Data]).
  
  check_db(DB, ExpData, Note) ->
      InDb = ?TEST_DB:foldl(DB, fun(E, AIn) -> [E | AIn] end, []),
      ?equals_w_note(lists:sort(InDb), lists:sort(ExpData), Note),
      ?equals_w_note(?TEST_DB:get_load(DB), length(ExpData), Note).
  
negative.code:                          write_scrubed_to_db(?TEST_DB:new(randoms:getRandomString()),
                                               Data),
      {ExpInInterval, _NotIn} = lists:partition(
                                  fun(E) ->
                                          is_in(Interval, element(1, E))
                                  end,
                                  ScrubedData),
      ExpInIntervalCounted = lists:sublist(lists:reverse(lists:keysort(1, ExpInInterval)), MaxNum),
      AllFold = ?TEST_DB:foldr(DB1, fun(E, AccIn) -> [E | AccIn] end, []),
      IntervalFold = ?TEST_DB:foldr(DB1,
                                   fun(E, AccIn) -> [E | AccIn] end,
  