diff options
-rw-r--r-- | t/errors.t | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -12,12 +12,20 @@ our $VERSION = '0.13'; my @t = 1 .. 3; +# The wrong kind of reference as a spec is fatal is( eval { breakdown [ a => 'a' ], @t } || undef, undef, 'error_wrongref_spec' ); +# An undefined value in spec hashref is fatal is( eval { breakdown { a => undef }, @t } || undef, undef, 'error_notref_undef' ); + +# A non-reference value in spec hashref is fatal is( eval { breakdown { a => 'a' }, @t } || undef, undef, 'error_notref_def' ); -is( eval { breakdown { a => [] }, @t } || undef, undef, 'error_badref_array' ); + +# The wrong kind of reference as a value in spec hashref is fatal +is( eval { breakdown { a => [] }, @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, 'error_badref_double' ); |