#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests => 1;
use MathModule;

sub facultyArray {
  my $min = shift;
  my $max = shift;
  my @results = ();
  for my $i($min..$max){
    # Fuege die berechnete Fakultaet
    # von $i an die Liste @result an
    push(@results,MathModule::faculty($i)); 
  }
  return @results;
}

my @facultynumbers = (-1,-1,1,1,2,6,24,120,720,5040, 40320,362880,3628800,39916800, 479001600,6227020800,87178291200, 1307674368000,20922789888000,-1);
is_deeply([facultyArray(-2,17)],[@facultynumbers],"arraytest");

