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

sub testFaculty{

  my %testhash = (
    17 => -1, # Teste Wert > 16
    -1 => -1, # Teste Wert < 0
     0 => 1,  # Teste 0
     1 => 1 # Teste != 0
  );

  my $ok = 1;
  foreach(sort keys %testhash){
      $ok = 0 if(MathModule::faculty($_) != $testhash{$_});
  }

  return $ok;
}

is(testFaculty(),1,"faculty");

