diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-05 22:49:18 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-05 22:49:18 +1300 |
commit | 8546feb64ed6d7b6d22b7267d9996cb4e87e3dcb (patch) | |
tree | 3e01c050f4dac224397476077205fe0e7d271962 | |
parent | Add a test to cover a missing branch (diff) | |
download | List-Breakdown-8546feb64ed6d7b6d22b7267d9996cb4e87e3dcb.tar.gz List-Breakdown-8546feb64ed6d7b6d22b7267d9996cb4e87e3dcb.zip |
Add comments for t/errors.t tests
-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' ); |