Note: Using PERL Module- fib.pm from post 1
Test Program(t.pl):
use strict;
use warnings;
use Test::More tests=>3;
use fib;
my @arr=(
[1,1],
[4,0],
[8,1]
);
foreach(@arr)
{
my $exp=pop @$_;
my $act=fib(@$_);
diag "Finding whether @$_ is fib";
ok($exp==$act);
}
No comments:
Post a Comment