use strict;
use warnings;
use Test::More;
use MyTools qw(add);
plan tests => 4;
is(add(1, 2), 3, 'first');
is(add(2), 2, 'second');
is(add(3), 3, 'third');
is(add(-1, 1), 0, 'fourth');
prove -lv t/test_add.t
Use of uninitialized value $y in addition (+) at /home/gabor/work/slides/perl/examples/test-warn/lib/MyTools.pm line 31.
Use of uninitialized value $y in addition (+) at /home/gabor/work/slides/perl/examples/test-warn/lib/MyTools.pm line 31.
t/test_add.t ..
1..4
ok 1 - first
ok 2 - second
ok 3 - third
ok 4 - fourth
ok
All tests successful.
Files=1, Tests=4, 0 wallclock secs ( 0.01 usr 0.01 sys + 0.16 cusr 0.02 csys = 0.20 CPU)
Result: PASS