examples/perl/t/empty_sum.t
use strict;
use warnings;

use Test::More tests => 2;
use Test::Warn;

use lib 'lib';
use MyTools;



{
    my $result;
    TODO: {
        local $TODO = 'fix warnings';
        warning_is {$result = sum()} undef, 'no warning in empty sum';
    }
    is($result, 0, 'result is ok');
}


examples/perl/t/fibonacci_test_die.t
use strict;
use warnings;

use Test::More tests => 3;
use Test::Exception;

use lib 'lib';
use MyTools;


{
    my $result = fibonacci(3);
    is($result, 2, 'fibonacci on 3');
}
{
    dies_ok {fibonacci()} 'expecting to die';
}
{
    my $result = fibonacci(4);
    is($result, 3, 'fibonacci on 4');
}