Note: Using PERL Module- fib.pm from post 1
Test Program(t.pl):
Test Program(t.pl):
use strict;
use warnings;
use Test::More tests => 3;
use fib;
chomp(my $a=<>);
SKIP: {
skip('This is skipped',3 )
if $a==1;
ok( fib(1) == 1 ,'tc1');
ok( fib(4) == 0 ,'tc4' );
ok( fib(8) == 1 ,'tc8' );
}
use warnings;
use Test::More tests => 3;
use fib;
chomp(my $a=<>);
SKIP: {
skip('This is skipped',3 )
if $a==1;
ok( fib(1) == 1 ,'tc1');
ok( fib(4) == 0 ,'tc4' );
ok( fib(8) == 1 ,'tc8' );
}
When input is not 1:


No comments:
Post a Comment