It would be better if we could eliminate the multiple occurance of is
use Test::More tests => 2;
my_test(2, '+', 3, 5);
my_test(4, '+', 4, 10);
sub my_test {
my ($x, $op, $z, $expected) = @_;
# do stuff
is($result, $expected);
}| Prev | Home (Copyright Gabor Szabo) Perl Training Israel | Next |
| My own test functions | Up | Create a test module |