File Coverage

blib/lib/Test/Deep/Blessed.pm
Criterion Covered Total %
statement 23 26 88.4
branch n/a
condition n/a
subroutine 7 8 87.5
pod 0 4 0.0
total 30 38 78.9


line stmt bran cond sub pod time code
1 24     24   180 use strict;
  24         52  
  24         1105  
2 24     24   132 use warnings;
  24         45  
  24         1751  
3              
4             package Test::Deep::Blessed 1.205;
5              
6 24     24   736 use Test::Deep::Cmp;
  24         59  
  24         181  
7              
8 24     24   144 use Scalar::Util qw( blessed );
  24         48  
  24         7303  
9              
10             sub init
11             {
12 173     173 0 265 my $self = shift;
13              
14 173         276 my $val = shift;
15              
16 173         1498 $self->{val} = $val;
17             }
18              
19             sub descend
20             {
21 173     173 0 318 my $self = shift;
22 173         305 my $got = shift;
23              
24 173         358 my $exp = $self->{val};
25 173         310 my $blessed = blessed($got);
26              
27 173         469 return Test::Deep::descend($blessed, Test::Deep::shallow($exp));
28             }
29              
30             sub render_stack
31             {
32 5     5 0 9 my $self = shift;
33 5         9 my $var = shift;
34              
35 5         17 return "blessed($var)"
36             }
37              
38             sub renderGot
39             {
40 0     0 0   my $self = shift;
41              
42 0           my $got = shift;
43              
44 0           $self->SUPER::renderGot(blessed($got));
45             }
46              
47             1;
48              
49             __END__