diff options
Diffstat (limited to 't/errors.t')
-rw-r--r-- | t/errors.t | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -4,7 +4,7 @@ use strict; use warnings; use utf8; -use Test::More tests => 5; +use Test::More tests => 7; use List::Breakdown 'breakdown'; @@ -23,8 +23,11 @@ is( eval { breakdown { a => undef }, @t } || undef, # A non-reference value in spec hashref is fatal is( eval { breakdown { a => 'a' }, @t } || undef, undef, 'error_notref_def' ); -# The wrong kind of reference as a value in spec hashref is fatal -is( eval { breakdown { a => [] }, @t } || undef, undef, 'error_badref_array' ); +# Any number of items in the numeric range shortcut besides 2 is fatal +is( eval { breakdown { a => [] }, @t } || undef, undef, 'error_badref_array' ); +is( eval { breakdown { a => [1] }, @t } || undef, undef, 'error_badref_array' ); +is( eval { breakdown { a => [ 1, 2, 3 ] }, @t } || undef, + undef, 'error_badref_array' ); # A double reference as a value in a spec hashref is fatal is( eval { breakdown { a => \{} }, @t } || undef, undef, |