Acme-RJWETMORE-Utils
view release on metacpan or search on metacpan
## Testing sum()
## Null argument
is( sum(), undef, 'sum() = undef --- null arg' );
## One argument
is( sum(55), 55, 'sum(55) = 55 --- one arg' );
## positive integers
is( sum(1,2,3), 6, 'sum(1,2,3) = 6 --- pos ints' );
## postitive and negative integers
is( sum(1,-2,3,-4), -2,
'sum(1,-2,3,-4) = -2 --- pos and neg ints' );
## positive integers with underscores
is( sum(1_300_438, 1_000_001), 2300439,
'sum(1_300_438, 1_000_001) = 2300439 --- ints w/ underscores' );
## floating points
is( sum(1.345,-2.44), -1.095,
'sum(1.345, -2.44) = -1.095 --- floating points' );
( run in 3.078 seconds using v1.01-cache-2.11-cpan-ceb78f64989 )