  
testAnzahl :-
  anzahl([], _, 0),
  anzahl([a], b, 0),
  anzahl([a], a, 1),
  anzahl([a, b, 42, a], a, 2).


testEinmalig :-
  einmalig([], []),
  einmalig([a], [a]),
  einmalig([a,b], [a,b]),
  einmalig([a,b,a], [a,b]),
  einmalig([a,b,b,b,a,a], [a,b]).  
    

testMerge :-
  merge([], [], []),	
  merge([a], [b], [a, b]),
  merge([a, c], [b], [a, b, c]),
  merge([a, c], [b, d, e, f], [a, b, c, d, e, f]),
  merge([a, c, x, y], [b, d], [a, b, c, d, x, y]).

    
testFindePaar :-
  findePaar([a,b], [a,b]),
  findePaar([a,b,c,d], [a,b]),  
  findePaar([a,a,a,b], [a,b]),    
  findePaar([a,a,a,b,b,b], [a,b]),
  not(findePaar([b,b,b,a,a,a], [a,b])),
  not(findePaar([a,c,b,a,c,b], [a,b])).
    
  
testDreiAlsSumme:-
  not(dreiAlsSumme([], 0)),
  not(dreiAlsSumme([1], 1)),
  not(dreiAlsSumme([1,1], 2)),
  not(dreiAlsSumme([2,4,6], 11)),
  not(dreiAlsSumme([2,44,4,6,4,2], 11)),
  dreiAlsSumme([2,2,2], 6),
  dreiAlsSumme([3,2,4,5], 9),
  dreiAlsSumme([3,2,4,5], 10),
  dreiAlsSumme([3,2,4,5], 11),
  dreiAlsSumme([3,2,4,5], 12),
  dreiAlsSumme([2,17,14,3,14,17,4], 9).
  
  
testSplit:-
  not(split([], _, _, _)),
  split([a], [], a, []),
  split([a,b,c,d], [], a, [b,c,d]),
  split([a,b,c,d], [a], b, [c,d]),
  split([a,b,c,d], [a, b], c, [d]),
  split([a,b,c,d], [a,b,c], d, []).
	 
        
testAmHaeufigsten :-
  not(amHaeufigsten([], _, _)),
  amHaeufigsten([a], a, 1),
  amHaeufigsten([a,a], a, 2),
  amHaeufigsten([b,a,a], a, 2),
  amHaeufigsten([a,b,a], a, 2),
  amHaeufigsten([a,a,b], a, 2),
  amHaeufigsten([b,a,a,b], a, 2),
  amHaeufigsten([b,a,a,b], b, 2),
  amHaeufigsten([b,a,a,b,c], a, 2),
  amHaeufigsten([b,a,a,b,c], b, 2),
  amHaeufigsten([b,a,a,b,c,c], a, 2),
  amHaeufigsten([b,a,a,b,c,c], b, 2),
  amHaeufigsten([b,a,a,b,c,c], c, 2).
   
   
testAll :-
     testAnzahl,
     testEinmalig,
     testMerge,
     testFindePaar,
     testDreiAlsSumme,
     testSplit,
     testAmHaeufigsten,
     !.

   
   
   