1#!/usr/bin/perl 2use strict; 3use warnings; 4use Test::More tests => 20; 5 6BEGIN { use_ok( 'Statistics::Lite', ':all' ); } 7 8# undef checking 9# 10is(min(undef), undef, "call min with only single undefined value" ); 11is(max(undef), undef, "call max with only single undefined value" ); 12is(min(), undef, "call min without values" ); 13is(max(), undef, "call max without values" ); 14is(min(6,undef,10), 6, "call min with undefined value" ); 15is(max(-6,-10,undef), -6, "call max with undefined value" ); 16is(min(undef, 7, -5), -5, "call min with initial undefined value" ); 17is(max(undef, 7, -5), 7, "call max with initial undefined value" ); 18is(min(undef,undef,undef), undef, "call min with only undefined values" ); 19is(max(undef,undef,undef), undef, "call max with only undefined values" ); 20is(count(undef, 7, -5), 2, "call count with undefined value" ); 21is(sum(undef, 7, -5), 2, "call sum with undefined value" ); 22is(mean(undef, 7, -5), 1, "call mean with undefined value" ); 23is(count(undef,undef,undef), 0, "call count with only undefined values" ); 24is(mean(undef,undef,undef), undef, "call mean with only undefined values" ); 25is(range(6,9,undef), 3, "call range with undefined value" ); 26is(range(undef,6,9), 3, "call range with leading undefined value" ); 27is(range(undef,undef,undef,7), 0, "call range with single defined value" ); 28is(range(undef,undef,undef), undef, "call range with only undefined values" ); 29