Wednesday, 4 February 2015

5. Run test when number of test cases are not known

Note: Using PERL Module- fib.pm from post 1

Test Program(t.pl):
use strict;
use warnings;


use Test::Simple 'no_plan';
use fib;

my @arr=(
[1,1],
[4,0],
[8,1]
);

foreach(@arr)
{
my $exp=pop @$_;
my $act=fib(@$_);
ok($exp==$act);
}

Output of t.pl





No comments:

Post a Comment