use strict;
use warnings;

use Test::More;

use_ok( 'Acme::DZYNERR::Utils', qw( sum ) );

ok( defined( &Acme::DZYNERR::Utils::sum ), 'sum() is defined' );

ok( ! defined( sum() ), 'returns undef for empty list' );

is( sum( 1, 2, 3 ), 6, '1 + 2 + 3 = 6' );
is( sum( '1', '2', '3' ), 6, '1 + 2 + 3 = 6' );
is( sum( 1.5, 2.5, -1, 0 ), 3, '1.5 + 2.5 + (-1) + 0 = 3' );

done_testing( 6 );
