File Coverage

blib/lib/Test/Deep/ArrayLength.pm
Criterion Covered Total %
statement 17 17 100.0
branch 2 2 100.0
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 24 26 92.3


line stmt bran cond sub pod time code
1 19     19   176 use strict;
  19         43  
  19         827  
2 19     19   122 use warnings;
  19         37  
  19         1480  
3              
4             package Test::Deep::ArrayLength 1.205;
5              
6 19     19   695 use Test::Deep::Ref;
  19         37  
  19         143  
7              
8             sub init
9             {
10 179     179 0 321 my $self = shift;
11              
12 179         289 my $val = shift;
13              
14 179         1577 $self->{val} = $val;
15             }
16              
17             sub descend
18             {
19 179     179 0 339 my $self = shift;
20 179         359 my $got = shift;
21              
22 179         364 my $exp = $self->{val};
23              
24 179 100       603 return 0 unless $self->test_reftype($got, "ARRAY");
25              
26 140         452 return Test::Deep::descend($got, Test::Deep::arraylengthonly($exp));
27             }
28              
29             1;
30              
31             __END__