examples/perl/tests/t20.pl
use strict;
use warnings;

use FindBin;
use lib "$FindBin::Bin/../lib";
use MyTools;

use Test::Simple tests => 6;

ok( sum(1, 1)    == 2, '1+1');
ok( sum(2, 2)    == 4, '2+2');
ok( sum(2, 2, 2) == 6, '2+2+2');
ok( sum(3, 3)    == 6, '3+3');

# negative numbers
ok( sum(-1, -1)  == -2, '-1 + -1');

# edge cases:
ok( sum(1, -1)   == 0, '1 + -1');

Output:

examples/perl/tests/t20.pl.out
1..6
ok 1 - 1+1
ok 2 - 2+2
not ok 3 - 2+2+2

#   Failed test '2+2+2'
#   at examples/perl/tests/t20.pl line 12.
ok 4 - 3+3
ok 5 - -1 + -1
ok 6 - 1 + -1
# Looks like you failed 1 test of 6.