From 8546feb64ed6d7b6d22b7267d9996cb4e87e3dcb Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 5 Oct 2017 22:49:18 +1300 Subject: Add comments for t/errors.t tests --- t/errors.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/t/errors.t b/t/errors.t index 11a7658..fb083cc 100644 --- a/t/errors.t +++ b/t/errors.t @@ -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' ); -- cgit v1.2.3