aboutsummaryrefslogtreecommitdiff
path: root/t/errors.t
blob: b229a4b07c18d10bcd16091cb94035688999be40 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!perl -T

use strict;
use warnings;
use utf8;

use Test::More tests => 4;

use List::Breakdown 'breakdown';

our $VERSION = '0.13';

my @t = 1 .. 3;
is( eval { breakdown { a => undef }, @t } || undef,
    undef, 'error_notref_undef' );
is( eval { breakdown { a => 'a' }, @t } || undef, undef, 'error_notref_def' );
is( eval { breakdown { a => [] },  @t } || undef, undef, 'error_badref_array' );
is( eval { breakdown { a => \{} }, @t } || undef, undef,
    'error_badref_double' );