File Coverage

inc/Test/Deep/ArrayLength.pm
Criterion Covered Total %
statement 17 17 100.0
branch 1 2 50.0
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 23 26 88.4


line stmt bran cond sub pod time code
1 2     2   10 #line 1
  2         4  
  2         57  
2 2     2   8 use strict;
  2         3  
  2         62  
3             use warnings;
4              
5             package Test::Deep::ArrayLength;
6 2     2   7  
  2         3  
  2         10  
7             use Test::Deep::Ref;
8              
9             sub init
10 4     4 0 6 {
11             my $self = shift;
12 4         7  
13             my $val = shift;
14 4         175  
15             $self->{val} = $val;
16             }
17              
18             sub descend
19 4     4 0 7 {
20 4         5 my $self = shift;
21             my $got = shift;
22 4         8  
23             my $exp = $self->{val};
24 4 50       20  
25             return 0 unless $self->test_reftype($got, "ARRAY");
26 4         18  
27             return Test::Deep::descend($got, Test::Deep::arraylengthonly($exp));
28             }
29              
30             1;